REST-API should provide a consistent error handling

Description

There are different behaviours in case of an error

  • Login-Dialog / response from MCRErrorServlet, JSON-Error-Message

We should provide consistent error messages in JSON-Format
with proper HTML Status Codes.

example from v1:
{ "errors ": [
{"code": "WRONG_
"title": "The MyCoRe ID \u0027doro_object_xxx \u0027 is not valid."
"detail ": "The ID is not valid: doro_object_xxx , it should match the pattern String_String_Integer"
} ] }

look again for best practices in other APIs (display the status code in JSON too ?).

Environment

None

Assignee

Thomas Scheffler

Reporter

Robert Stephan

Labels

None

URL

None

External issue ID

None

Components

Sprint

None

Fix versions

Priority

Medium
Configure