ExceptionJsonSubscriber
class ExceptionJsonSubscriber extends HttpExceptionSubscriberBase (View source)
Default handling for JSON errors.
Methods
Specifies the request formats this subscriber will respond to.
Specifies the priority of all listeners in this class.
Handles errors for this subscriber.
Registers the methods in this class that should be listeners.
Handles all 4xx errors for JSON.
Details
protected array
getHandledFormats()
Specifies the request formats this subscriber will respond to.
static protected int
getPriority()
Specifies the priority of all listeners in this class.
The default priority is 1, which is very low. To have listeners that have a "first attempt" at handling exceptions return a higher priority.
onException(ExceptionEvent $event)
Handles errors for this subscriber.
static array
getSubscribedEvents()
Registers the methods in this class that should be listeners.
on4xx(ExceptionEvent $event)
Handles all 4xx errors for JSON.