Error Response
Last updated
Last updated
Singpass APIs are RESTful in design and communicate classes of errors based on the HTTP status code. The status code should be used to determine if the error is caused by consumer or provider. Consumers should log the HTTP status code along with the id
and/or trace_id
of the error.
Http Status | Description |
---|---|
Example: Invalid Request Parameters
Example: Server Error
Path | Type | Description |
---|---|---|
4xx
Errors caused by API consumer. You can expect codes such as 400, 401, 403, 404 etc. if incorrect requests are made to APIs.
Example: 400 Bad Request due to invalid/missing request arguments
5xx
Errors caused by API provider or its dependencies. You can expect codes such as 500, 502, 503 etc if there is an issue on Singpass or its dependencies.
Example: 500: Internal Server Error due to some kind of programming error.
id
String
The unique identifier for this error/request. Please log this identifier for support and debugging purposes.
trace_id
String InstanceOfAssertFactory
(Optional) An auxiliary id for request correlation across services. Please also log this identifier for operational support and debugging purposes.
error
String
Error code representing broad class of error; likely to be one of CLIENT_SIDE_ERROR, ARGUMENTS_NOT_VALID, SERVER_SIDE_ERROR, TOO_MANY_REQUESTS. However, specific error codes can be returned for some endpoints, in which case you may find more details in the documentation for that endpoint.
error_description
String
Returns human readable general information about the reason for the error. Note that due to security reasons; detailed information is unlikely to be available in this message.