logging improvements
This commit is contained in:
2
main.go
2
main.go
@@ -238,7 +238,7 @@ func housekeeping() {
|
|||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
default:
|
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
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,7 +219,8 @@ type MatchResponse struct {
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
ErrorSharecodeNoMatch = errors.New("sharecode not provided")
|
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")
|
ErrorAuthcodeUnauthorized = errors.New("authcode unauthorized")
|
||||||
ErrorNoMatch = errors.New("no match found")
|
ErrorNoMatch = errors.New("no match found")
|
||||||
)
|
)
|
||||||
@@ -565,7 +566,7 @@ func getNextShareCode(lastCode, apiKey, authCode string, steamID uint64, rl *rat
|
|||||||
case http.StatusTooManyRequests:
|
case http.StatusTooManyRequests:
|
||||||
return nil, ErrorAuthcodeRateLimit
|
return nil, ErrorAuthcodeRateLimit
|
||||||
case http.StatusServiceUnavailable:
|
case http.StatusServiceUnavailable:
|
||||||
return nil, ErrorAuthcodeRateLimit
|
return nil, ErrorAuthcodeUnavailable
|
||||||
case http.StatusPreconditionFailed:
|
case http.StatusPreconditionFailed:
|
||||||
return nil, ErrorSharecodeNoMatch
|
return nil, ErrorSharecodeNoMatch
|
||||||
case http.StatusForbidden:
|
case http.StatusForbidden:
|
||||||
|
|||||||
Reference in New Issue
Block a user