Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 6c9b371

Browse files
committed
add more detailed unmashal error
1 parent c293a17 commit 6c9b371

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

restapi.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func (s *Session) doRequestLockedBucket(method, urlStr, contentType string, b []
146146
if b != nil {
147147
req.Header.Set("Content-Type", contentType)
148148
}
149-
149+
150150
// TODO: Make a configurable static variable.
151151
req.Header.Set("User-Agent", fmt.Sprintf("DiscordBot (https://github.com/jonas747/discordgo, v%s)", VERSION))
152152
req.Header.Set("X-RateLimit-Precision", "millisecond")
@@ -208,7 +208,7 @@ func (s *Session) doRequestLockedBucket(method, urlStr, contentType string, b []
208208
rl := TooManyRequests{}
209209
err = json.Unmarshal(response, &rl)
210210
if err != nil {
211-
s.log(LogError, "rate limit unmarshal error, %s, %q", err, string(response))
211+
s.log(LogError, "rate limit unmarshal error, %s, %q, url: %s", err, string(response), urlStr)
212212
return
213213
}
214214

0 commit comments

Comments
 (0)