Skip to content

Resolve "Deal with RequestRejectedException more gracefully"

Closes #568 (closed). Rejected requests are now mapped to status 400:

{
    "timestamp": "2024-05-14T09:29:03.687+00:00",
    "status": 400,
    "error": "Bad Request",
    "path": "/api/resources/wikidata%253AQ59628617/"
}

I do not think that we need a test for this. Also, this configuration might become the default in newer versions of spring (see here).

Note: It is not possible to use catch a RequestRejectedException within the ExceptionHandler, hence the usage of a HttpStatusRequestRejectedHandler.

Edited by Marcel Konrad

Merge request reports