Added debug logs to api and gw errors

This commit is contained in:
RemixDev 2021-06-01 20:09:35 +02:00
parent 0097541062
commit ddadfdf3e4
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ class API{
timeout: 30000
}).json()
} catch (e) {
console.log(e)
console.debug("[ERROR] deezer.api", method, args, e.message)
await new Promise(r => setTimeout(r, 2000)) // sleep(2000ms)
return this.api_call(method, args)
}

View file

@ -59,7 +59,7 @@ class GW{
timeout: 30000
}).json()
}catch (e){
console.log(e)
console.debug("[ERROR] deezer.gw", method, args, e.message)
await new Promise(r => setTimeout(r, 2000)) // sleep(2000ms)
return this.api_call(method, args, params)
}