One thing I wanted to bring up: I tried changing â{âClient-IDâ: âxxxâ}â to {âClient-IDâ: ââ} and it still returned the empty JSON object. Shouldnât it give me a bad request if the client ID is empty/wrong?
Iâm not familiar with AJAX so iâm not sure how it handles a bad request, but when I view it on my end without a valid Client ID then I see the expected error messaging.
{âerrorâ:âBad Requestâ,âstatusâ:400,âmessageâ:âNo client id specifiedâ}
You may need to include proper error handling to see this messaging - a quick google provided the below example:
function handleAjaxError(jqXHR, textStatus, errorThrown) {
if (jqXHR.status == 500) {
// Server side error
} else if (jqXHR.status == 404) {
// Not found
} else if (jqXHR.status == 400) {
//Bad request
}
}
Iâm able to see the error message in console. If I omit the âheadersâ line completely from my request, I see {âerrorâ:âBad Requestâ,âstatusâ:400,âmessageâ:âNo client id specifiedâ}.
But if I keep the headers line but remove my client id, or if I replace my id with just a bogus id, it still returns an empty object as a response (and no errors). Do you think this is due to the caching you mentioned above?
Hmm I would still expect it to give the 400 error in a scenario where a invalid Client ID is provided or none at all, so I think itâs weird that you are seeing a different outcome (as in, no errors populated.) Though, I could be misinterpreting (or misunderstanding) something with AJAX due to my limited knowledge on it
It may be a remnant of the server issues - as I still see zero results returned for this one (even with other games).