Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UnprocessableHttpEntityException.php

function UnprocessableHttpEntityException::__construct

UnprocessableHttpEntityException constructor.

Parameters

\Exception|null $previous: The pervious error, if any, associated with the request.

array $headers: The headers associated with the request.

int $code: The HTTP status code associated with the request. Defaults to zero.

Overrides HttpException::__construct

File

core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php, line 45

Class

UnprocessableHttpEntityException
A class to represent a 422 - Unprocessable Entity Exception.

Namespace

Drupal\jsonapi\Exception

Code

public function __construct(?\Exception $previous = NULL, array $headers = [], $code = 0) {
    parent::__construct(422, "Unprocessable Entity: validation failed.", $previous, $headers, $code);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal