# Error Types

## Common Error Types

Common Error Types that can be encountered with either Tyro.js or TyroSDK.

| Error type | Description |
|  --- | --- |
| `CARD_ERROR` | Occurs when there is an issue with the card provided. |
| `SERVER_ERROR` | Occurs when there is an error on the server. This should rarely happen and should quickly resolve. |


## Tyro.js

Error Types define the type of error to expect on the frontend when something goes wrong.
The following error types are returned:

| Error type | Description |
|  --- | --- |
| `CLIENT_VALIDATION_ERROR` | Occurs when there is client validation error in the request. |
| `SERVER_VALIDATION_ERROR` | Occurs when there is server validation error in the request. |


## TyroSDK React Native

When the SDK encounters an error it will set tyroError.errorType to the corresponing error type seen below.

The types of errorTypes are:

| tyroError Error Types | Description |
|  --- | --- |
| `CLIENT_INITIALISATION_ERROR` | Occurs when the client failed to initialise |
| `PAY_REQUEST_ERROR` | Occurs when there is a problem with the pay request validation or payment fails |


# Error Codes

Depending on the stage of the particular error, different error codes can be returned. Please refer to full list of supported [Error Codes](/app/apis/pay/errors).