mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
refactor: add custom Exception class
This commit is contained in:
@@ -27,4 +27,17 @@ api_platform:
|
||||
JWT:
|
||||
name: Authorization
|
||||
type: header
|
||||
exception_to_status:
|
||||
# The 4 following handlers are registered by default, keep those lines to prevent unexpected side effects
|
||||
Symfony\Component\Serializer\Exception\ExceptionInterface: 400 # Use a raw status code (recommended)
|
||||
ApiPlatform\Exception\InvalidArgumentException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
|
||||
ApiPlatform\ParameterValidator\Exception\ValidationExceptionInterface: 400
|
||||
Doctrine\ORM\OptimisticLockException: 409
|
||||
|
||||
# Validation exception
|
||||
ApiPlatform\Validator\Exception\ValidationException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_UNPROCESSABLE_ENTITY
|
||||
|
||||
App\Exception\DomainNotFoundException: 404
|
||||
App\Exception\MalformedDomainException: 403
|
||||
App\Exception\TldNotSupportedException: 403
|
||||
App\Exception\UnknownRdapServerException: 403
|
||||
|
||||
Reference in New Issue
Block a user