logging improvements
This commit is contained in:
2
main.go
2
main.go
@@ -238,7 +238,7 @@ func housekeeping() {
|
||||
}
|
||||
continue
|
||||
default:
|
||||
log.Warningf("[HK] Error while requesting sharecodes for %d: %v", tPlayer.ID, err)
|
||||
log.Infof("[HK] Unable to request sharecodes for %d: %v", tPlayer.ID, err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
@@ -219,7 +219,8 @@ type MatchResponse struct {
|
||||
|
||||
var (
|
||||
ErrorSharecodeNoMatch = errors.New("sharecode not provided")
|
||||
ErrorAuthcodeRateLimit = errors.New("temporary rate-limited/unavailable")
|
||||
ErrorAuthcodeRateLimit = errors.New("temporary rate-limited")
|
||||
ErrorAuthcodeUnavailable = errors.New("temporary unavailable")
|
||||
ErrorAuthcodeUnauthorized = errors.New("authcode unauthorized")
|
||||
ErrorNoMatch = errors.New("no match found")
|
||||
)
|
||||
@@ -565,7 +566,7 @@ func getNextShareCode(lastCode, apiKey, authCode string, steamID uint64, rl *rat
|
||||
case http.StatusTooManyRequests:
|
||||
return nil, ErrorAuthcodeRateLimit
|
||||
case http.StatusServiceUnavailable:
|
||||
return nil, ErrorAuthcodeRateLimit
|
||||
return nil, ErrorAuthcodeUnavailable
|
||||
case http.StatusPreconditionFailed:
|
||||
return nil, ErrorSharecodeNoMatch
|
||||
case http.StatusForbidden:
|
||||
|
Reference in New Issue
Block a user