You are here

public function UnprocessableHttpEntityException::__construct in JSON:API 8

Same name and namespace in other branches
  1. 8.2 src/Exception/UnprocessableHttpEntityException.php \Drupal\jsonapi\Exception\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.

File

src/Exception/UnprocessableHttpEntityException.php, line 41

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);
}