improved error messages
This commit is contained in:
@@ -501,8 +501,10 @@ func getNextShareCode(lastCode string, apiKey string, authCode string, steamId u
|
|||||||
switch r.StatusCode {
|
switch r.StatusCode {
|
||||||
case http.StatusAccepted:
|
case http.StatusAccepted:
|
||||||
return "n/a", nil
|
return "n/a", nil
|
||||||
case http.StatusTooManyRequests, http.StatusServiceUnavailable:
|
case http.StatusTooManyRequests:
|
||||||
return "", AuthcodeRateLimitError{errors.New("api temp. ratelimited")}
|
return "", AuthcodeRateLimitError{errors.New("temporary ratelimited")}
|
||||||
|
case http.StatusServiceUnavailable:
|
||||||
|
return "", AuthcodeRateLimitError{errors.New("temporary unavailable")}
|
||||||
case http.StatusPreconditionFailed:
|
case http.StatusPreconditionFailed:
|
||||||
return "", SharecodeNoMatchError{errors.New("sharecode not from player history")}
|
return "", SharecodeNoMatchError{errors.New("sharecode not from player history")}
|
||||||
case http.StatusForbidden:
|
case http.StatusForbidden:
|
||||||
|
Reference in New Issue
Block a user