ExceptionMapperInterface
Maps an exception thrown on the v3 prefix to an API Platform error resource, {@see IbexaError} as a rule.
The return type is API Platform's Error and not IbexaError on purpose: API Platform renders an error
through the #[ErrorResource] operations of its own class, so an error carrying more members than IbexaError
(a quota error with the remaining amount, say) is a sibling resource extending Error, not a subclass of the final
IbexaError. Such a sibling is mapped with this same interface and gets the IRI as type like IbexaError does.
Implementations are tagged ibexa.api_platform.exception_mapper automatically; the first mapper
that supports the exception wins. Mappers run by tag priority, a higher priority on the tag runs first.
Methods¶
map()
¶
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $throwable | Throwable | - | - |
Return values
Error
supports()
¶
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $throwable | Throwable | - | - |
Return values
bool