1
0
mirror of https://github.com/twirl/The-API-Book.git synced 2025-05-31 22:09:37 +02:00

Merge pull request #57 from ivanovmg/fix/status-code-bad-request

Fix status code for BadRequest in Section 13
This commit is contained in:
Sergey Konstantinov 2024-12-04 13:44:11 +02:00 committed by GitHub
commit 5fb91e42b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -492,7 +492,7 @@ POST /v1/coffee-machines/search↵
"longitude": 0
}
}
→ 404 Bad Request
→ 400 Bad Request
{
"errors": [{
"type": "suspicious_coordinates",

View File

@ -510,7 +510,7 @@ POST /v1/coffee-machines/search↵
"longitude": 0
}
}
→ 404 Bad Request
→ 400 Bad Request
{
"errors": [{
"type": "suspicious_coordinates",
@ -1043,4 +1043,4 @@ POST /v1/run/sql
Следует отметить, что индикация, какие сообщения следует показать пользователю, а какие написаны для разработчика, должна, разумеется, быть явной конвенцией вашего API. В примере для этого используется префикс `localized_`.
И ещё одна вещь: все строки должны быть в кодировке UTF-8 и никакой другой.
И ещё одна вещь: все строки должны быть в кодировке UTF-8 и никакой другой.