Archived 22.11.20. Content moved to Frequently asked error scenarios and their responses.
I would like to clarify what the exact error code should be for the following scenarios:
x-vheader is missing from the request
When a negative value or a decimal value (1.2) is sent for
What error response payload is required?
x-v endpoint version header is mandatory. See CDS HTTP Headers.
If a mandatory header is missing then a 400 Bad Request error is suitable.
400 Bad Request
Request has malformed, missing or non-compliant JSON body or URL parameters
If an unsupported version is requested, such as a negative or non-integer value, then a 406 Not Acceptable error is suitable.
406 Not Acceptable
The request contained an Accept header other than permitted media types, a character set other than UTF-8 or a version that was not supported
406 responses, the standard does not specify an error payload, and none is required. The implementer can supply a custom payload. See CDS HTTP Response Codes.
Specifying a Custom Payload
Where no error payload is specified in the standard, the implementer is free to return a null payload, or include information in the payload as desired.
If the implementer chooses to supply a custom payload, it must follow the format specified in CDS Response Payload Structure.
For each unique
code value, the
title field must be consistent.