HTTP Status Codes
Last updated:2021-12-15
HTTP Status Codes
This document defines the HTTP response code specification for the UMS REST API.
Status Code Definitions
| Code | Description | Detailed Explanation |
|---|---|---|
| 200 | Request succeeded | The request succeeded. |
| 400 | Bad request | The request is invalid. The corresponding description explains the reason. |
| 401 | Authentication failed | No authentication information was provided, or authentication failed. |
| 403 | Rejected | The request is understood but not accepted. The corresponding description explains the reason. |
| 500 | Internal server error | An internal server error occurred. Please contact us so we can resolve it as soon as possible. |
Rules
- 200 always indicates success. Exceptions never use the 200 response code.
- For business logic errors, use a specific 4xx error code whenever possible; otherwise, use 400.
- For internal server errors without a specific error code, use 500.
- When a business exception occurs, define the error information in JSON format in the response body.
References
- For business response codes, see Business Response Codes
- Twitter Status Codes
- Wikipedia HTTP Status Codes
Was this document helpful?