# Errors

To communicated the success or failure of API requests to clients, TNG Identity SSO uses standard HTTP codes and redirects with error information in responses. Codes `2xx` indicate a success, `3xx` is a redirection with either success of failure response, `4xx` indicates a client error and `5xx` an Identity SSO server error.

Errors that can be handled programatically contain an error response body or in case of indirection, the error attributes are encoded in the redirection URI in the `application/x-www-form-urlencoded` format.

An example of a redirect response uri: \`[https://{redirect-url}?client\_id=d8ffc41f-61ef-47d6-8661-e1374e82a563\&state=MCatotF2bqYhi56JjBR0\&error=server\_error\&error\_description=server+error](https://identity.psp.test.nchpsp.app/products/web/2fa94b46155c30ca/portal/sso/demo?client_id=d8ffc41f-61ef-47d6-8661-e1374e82a563\&state=MCatotF2bqYhi56JjBR0\&error=server_error\&error_description=server+error)\`

#### Attributes

***

**code** `string`

For some scenarios that can be handled programatically a short error code indicating the [Error Code](/tng-identity-documentation/tng-identity-sso/sso-api/errors/error-codes.md) is returned

***

**error\_description** `string`

In some cases an additional human readable description is returned


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.teranode.group/tng-identity-documentation/tng-identity-sso/sso-api/errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
