Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Content-type value for error responses #129

Open
Nahor opened this issue Aug 28, 2022 · 0 comments
Open

Incorrect Content-type value for error responses #129

Nahor opened this issue Aug 28, 2022 · 0 comments

Comments

@Nahor
Copy link

Nahor commented Aug 28, 2022

For invalid requests, e.g. with an invalid game value in a game_event request, GameSense returns a 400 error with a {"error":"..."} string (JSON) in the body but the Content-type is text/html instead of application/json.

This issue is made worse by the fact that for 404 errors (e.g when sending a request to /game_event_foo), GameSense returns a 404 error with a simple Page not found string (i.e. not JSON) in the body.

In other words, an app has no way to know if the response should be parsed or not to extract the error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant