- 1xx : Informational
- 2xx : Success
- 3xx : Redirection
- 4xx : Client Error
- 5xx : Server Error
HTTP request that was sent to the server has invalid syntax.
E.g:
- The user's cookie that is associated with the site is corrupt. Clearing the browser's cache and cookies could solve this issue
- Malformed request due to a faulty browser
- Malformed request due to human error when manually forming HTTP requests (e.g. using curl incorrectly)
Server cannot process the request for an unknown reason.
Lets say in your Rest API, the client sent some data that while processing results in some exception, then its most probably a 400 Bad Request HTTP Status code. Basically anything you cannot do but is asked for by the client and you are able to catch it is 400.
In flask use the abort function to return custom/corresponding status codes and message descriptions.