Skip to content

The response body of error 503 is not valid JSON #1726

Description

@odisseus

Current behavior

Currently the response looks like this:

The server was not able to produce a timely response to your request.
Please try again in a short while!

This seems to be the default behaviour of pekko-http.

Expected Behavior

The Swagger specification promises that both 4xx and 5xx errors will return a valid JSON. Clients that rely on this may crash when attempting to parse this non-conforming response. See for example neandertech/dexsearch#6.

Extra comments

A similar issue in an unrelated project: wellcomecollection/catalogue-api#631

Search terms

pekko-http, 503, error, json, parse

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions