CRXError
is thrown. It includes a code
property that indicates the type of error. the value of code
is defined in the API_ERRORS
object.
You can handle errors using a try-catch block as follows:
Errors
Key | Value | Description |
---|---|---|
CREDITS_NOT_ENOUGH | credits_not_enough | Not enough credits available. |
CREDITS_NOT_FOUND | credits_not_found | No credits found for user. |
PLAN_NOT_FOUND | plan_not_found | No plan found for user. |
UNAUTHORIZED | unauthorized | User is not authorized. |
UNKNOWN | unknown | An unknown error occurred. |