From c2bda511936e968619d7f8c10b75a336a580e900 Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Tue, 21 May 2019 07:39:13 +0200 Subject: [PATCH] Use 400 Bad Request status code even for semantic errors in JSON data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Roberto Abdelkader Martínez Pérez --- spec/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/README.md b/spec/README.md index 5da8f1b..c531870 100644 --- a/spec/README.md +++ b/spec/README.md @@ -186,7 +186,7 @@ Returns JSON data about the current routes. **Header**: `Content-Type: application/json`
**Content**: `{ "error": "Malformed JSON." }` - * **Code**: `422 Unprocessable Entity`
+ * **Code**: `400 Bad Request`
**Header**: `Content-Type: application/json`
**Content**: `{ "error": "Mandatory field(s) not provided." }` @@ -246,7 +246,7 @@ TODO **Header**: `Content-Type: application/json`
**Content**: `{ "error": "Malformed JSON." }` - * **Code**: `422 Unprocessable Entity`
+ * **Code**: `400 Bad Request`
**Header**: `Content-Type: application/json`
**Content**: `{ "error": "Mandatory field(s) not provided." }`