Skip to content

Errors are sent in text/plain rather than json content-type #112

@thbar

Description

@thbar

During my manual tests of #109, I noticed that when the base schedule is not available, we get a text/plain error currently.

Here is an example, using a local test config and querying http://localhost:8080/test:

HTTP/1.1 502 Bad Gateway
content-length: 170
connection: close
content-type: text/plain; charset=utf-8
date: Mon, 18 Jan 2021 10:01:12 GMT

theoretical dataset temporarily unavailable : impossible to read GTFS http://localhost:8000/SEM-GTFS.zip because Invalid Zip archive: Could not find central directory end

Since the whole API is JSON, I believe standardising on JSON content-type of errors would be better for the end-user life.

Useful resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions