overwatch-api icon indicating copy to clipboard operation
overwatch-api copied to clipboard

Fix `message` value on error responses

Open micalevisk opened this issue 5 years ago • 1 comments

https://github.com/alfg/overwatch-api/blob/6e3ae07431d2ba1ef5f5aba7a1d4774f3ec4d9ad/server/routes/owl/standings.js#L29 this line leads to { message: [object Object] } as a response. I think you must change to err.message or just drop the .toString() call

micalevisk avatar Oct 21 '20 20:10 micalevisk

Ah, good catch. I think the OWL endpoint https://api.overwatchleague.com/v2/standings was probably returning a bad response. This happens sometimes when the server gets rate limited.

I'll probably update this to a generic error response message.

alfg avatar Oct 22 '20 01:10 alfg