Hi Alexander
The swagger file for each Open API lists a standard set of HTTP return codes, this set is generated by the tooling that we use and is identical for the same operation for all (recently-published) APIs.
Thus POST failures include 400, 401, 403, 405, 409, together with an Error structure that can be used to communicate more details of the error.
You should choose the relevant HTTP code and then fill the error structure (copied below) with more specific information.
Hope it helps
"code": {
"type": "string",
"description": "Application relevant detail, defined in the API or a common list."
},
"reason": {
"type": "string",
"description": "Explanation of the reason for the error which can be shown to a client user."
},
"message": {
"type": "string",
"description": "More details and corrective actions related to the error which can be shown to a client user."
},
"status": {
"type": "string",
"description": "HTTP Error code extension"
},
"referenceError": {
"type": "string",
"format": "uri",
"description": "URI of documentation describing the error."
},
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
------------------------------