Conventions for REST return codes and error handling
- Acronym
- conventions-for-rest-return-codes
- Belongs to
-
SIG
- Responsible
-
Mert Barutcu
- History
- (v1) 2021-10-08 - created initially
- (v2) 2021-10-18 - took decision
- (v3) 2021-10-21 - decision explained
- (v4) 06-11-06 - set status to agreed
Why is there need for such a decision?
This should be uniform across the REST APIs because the response to a request no matter which service is involved
should be clear.
Additional sources for better understanding the background
Best Practices for REST API Error Handling
Viable Options
- HTTP status codes are defacto standard for REST calls.
Alternatives not seriously considered
How is this decision evaluated?
No evaluation needed.
Resolution Details
200 - OK
300 - Redirection
400 - Bad Request
401 - Unauthorized
500 - Internal Server Error
Reasons for the resolution
The best practices for REST error handling are HTTP response messages.
HTTP Status Codes are clear defined in RFC 2616.