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:
pancho horrillo
2019-05-21 07:39:13 +02:00
parent 42431b771c
commit c2bda51193
+2 -2
View File
@@ -186,7 +186,7 @@ Returns JSON data about the current routes.
**Header**: `Content-Type: application/json`<br />
**Content**: `{ "error": "Malformed JSON." }`
* **Code**: `422 Unprocessable Entity`<br />
* **Code**: `400 Bad Request`<br />
**Header**: `Content-Type: application/json`<br />
**Content**: `{ "error": "Mandatory field(s) not provided." }`
@@ -246,7 +246,7 @@ TODO
**Header**: `Content-Type: application/json`<br />
**Content**: `{ "error": "Malformed JSON." }`
* **Code**: `422 Unprocessable Entity`<br />
* **Code**: `400 Bad Request`<br />
**Header**: `Content-Type: application/json`<br />
**Content**: `{ "error": "Mandatory field(s) not provided." }`