Skip to content

Incorrect Content-type value for error responses #129

@Nahor

Description

@Nahor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions