imemento / exceptions
HTTP Exceptions
Installs: 2 622
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- ramsey/uuid: ^4.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-03-26 21:50:06 UTC
README
This package provides some common exceptions to be used in all iMemento Services.
Install
composer require imemento/exceptions
Usage
throw new ResourceException($message, $debug, $code, $previous);
All our exceptions that extend the HttpException class have a unique id, optional debug info and an error code. They will be mapped to a specific response from http-responses using our custom error handler.
Errors
Exception | Status Code |
---|---|
iMemento\Exceptions\Exception | 1000 |
iMemento\Exceptions\InvalidTokenException | 1001 |
iMemento\Exceptions\ExpiredAuthTokenException | 1002 |
iMemento\Exceptions\ExpiredPermsTokenException | 1003 |
iMemento\Exceptions\ExpiredConsumerTokenException | 1004 |
iMemento\Exceptions\MissingTokenException | 1005 |
iMemento\Exceptions\MissingRoleException | 1010 |
iMemento\Exceptions\MissingSessionException | 1020 |
iMemento\Exceptions\MissingParameterException | 1030 |
iMemento\Exceptions\ResourceException | 1100 |
iMemento\Exceptions\StoreResourceFailedException | 1101 |
iMemento\Exceptions\UpdateResourceFailedException | 1102 |
iMemento\Exceptions\DeleteResourceFailedException | 1103 |