> For the complete documentation index, see [llms.txt](https://simpaypl.gitbook.io/simpay-laravel/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://simpaypl.gitbook.io/simpay-laravel/exceptions.md).

# Exceptions

Every exception in our library is extended from:

```php
\SimPay\Laravel\Exceptions\SimPayException
```

* When response from our API is 401 or 403, `\SimPay\Laravel\Exceptions\AuthorizationException` is thrown;
* When response from our API is 404, `\SimPay\Laravel\Exceptions\ResourceNotFoundException` is thrown (this will be also thrown, when SMS code does not exists);
* When response from our API is 422, `\SimPay\Laravel\Exceptions\ValidationFailedException` is thrown (you can get errors by using `$exception->errors()`.

If SimPayException is thrown, you may see `errorCode`, which may be useful for specific errors returned (eg. BLIK Alias already registered, invalid BLIK T6 code).

* errorCode may be a string or null
