DefaultExceptionSubscriber::on422

public DefaultExceptionSubscriber::on422(GetResponseForExceptionEvent $event)

Handles a 422 error for HTTP.

Parameters

\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event: The event to process.

File

core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php, line 114

Class

DefaultExceptionSubscriber
Handles default error responses in serialization formats.

Namespace

Drupal\serialization\EventSubscriber

Code

public function on422(GetResponseForExceptionEvent $event) {
  $this->setEventResponse($event, Response::HTTP_UNPROCESSABLE_ENTITY);
}
doc_Drupal
2016-10-29 09:01:40
Comments
Leave a Comment

Please login to continue.