Use 400 Bad Request status code even for semantic errors in JSON data
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
This commit is contained in:
+2
-2
@@ -186,7 +186,7 @@ Returns JSON data about the current routes.
|
|||||||
**Header**: `Content-Type: application/json`<br />
|
**Header**: `Content-Type: application/json`<br />
|
||||||
**Content**: `{ "error": "Malformed JSON." }`
|
**Content**: `{ "error": "Malformed JSON." }`
|
||||||
|
|
||||||
* **Code**: `422 Unprocessable Entity`<br />
|
* **Code**: `400 Bad Request`<br />
|
||||||
**Header**: `Content-Type: application/json`<br />
|
**Header**: `Content-Type: application/json`<br />
|
||||||
**Content**: `{ "error": "Mandatory field(s) not provided." }`
|
**Content**: `{ "error": "Mandatory field(s) not provided." }`
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ TODO
|
|||||||
**Header**: `Content-Type: application/json`<br />
|
**Header**: `Content-Type: application/json`<br />
|
||||||
**Content**: `{ "error": "Malformed JSON." }`
|
**Content**: `{ "error": "Malformed JSON." }`
|
||||||
|
|
||||||
* **Code**: `422 Unprocessable Entity`<br />
|
* **Code**: `400 Bad Request`<br />
|
||||||
**Header**: `Content-Type: application/json`<br />
|
**Header**: `Content-Type: application/json`<br />
|
||||||
**Content**: `{ "error": "Mandatory field(s) not provided." }`
|
**Content**: `{ "error": "Mandatory field(s) not provided." }`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user