fix: remove useless log when summoner doesn't exist

This commit is contained in:
Valentin Kaelin 2020-06-14 20:11:24 +02:00
parent 609dfcc9d0
commit 9552d2b103

View file

@ -40,8 +40,8 @@ class JaxRequest {
this.retries-- this.retries--
if (statusCode !== 500 && statusCode !== 503 && statusCode !== 504) { if (statusCode !== 500 && statusCode !== 503 && statusCode !== 504) {
// Don't log 404 when summoner isn't playing // Don't log 404 when summoner isn't playing or the summoner doesn't exist
if (!this.endpoint.includes('spectator')) { if (!this.endpoint.includes('spectator/v4/active-games/by-summoner') && !this.endpoint.includes('summoner/v4/summoners/by-name')) {
Logger.transport('file').error(`JaxRequest Error ${statusCode} : `, rest) Logger.transport('file').error(`JaxRequest Error ${statusCode} : `, rest)
} }