Closed Anton3 closed 6 years ago
I feel that 404 should still be returned in both cases
I feel the same, but more importantly, since not all multi requests return the id requested, in the current way the api works, keeping the order is the reason to fail the request.
Idea
Add "exists" field for
/player
and/clan
endpoints. For batch requests, if some players or clans don't exist, the response should still include other players.Rationale
Currently, in a request for multiple players or clans, if any of them does not exist, the API returns error for the whole request. I try to use batch requests with many tags whenever possible, but if the API returns error, I have to send individual requests instead, trying to find out, which account was banned, or which clan no longer exists. This leads to longer delays.
Affected endpoints
/player/:tag
/player/:tag/battles
/player/:tag/chests
/clan/:tag
/tournament/:tag
Request Details:
Response Details:
Request Details:
Response Details: