Repository navigation
v5.0.0.0-handle-api-errors
·
7 commits
to main
since this release
The "400 Bad Request" error is the most common API error. It comes about when a client sends a request with invalid data. Create a dedicated method used to handle this type of error.
The error message contains a short description of the error, plus an optional error message.
{
"error": "short error description",
"message": "error message"
}Flask should return a JSON response to the error.