Closed kmohr-soprasteria closed 1 month ago
The use of response codes is divided into three groups:
- Errors recognized by the REST server (see list in 1) These error codes are already implemented in the Express FrameWork The existing implementation should not be overwritten, but used as-is => The handling of errors should be limited to those errors that are recognized at the application level
- Errors that are general and do not provide a specific message or counter measure. Here, the generally defined status codes according to the list in 2 are to be used. The status code and body are to be defined in the OAS. The body should always contain code and message. The use of these codes is not documented centrally.
- The errors are specific to the MW SDN domain or the user is to be informed in a targeted manner or a counter measure is to be supported with additional attributes. In this case, a new status code and a new body are to be defined. The body should always contain code and message, and possibly other attributes. The StatusCode must not yet be assigned in the two existing lists 1 and 2. The StatusCode and Body must be specified in the OAS. The definition of the StatusCode and Body should be included in the documentation of the ApplicationPattern. Existing definitions should be reused for the same cases in the future.
error codes will be aligned across applications -> spec needs to be update