function UnprocessableHttpEntityException::__construct
Same name in other branches
- 9 core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php \Drupal\jsonapi\Exception\UnprocessableHttpEntityException::__construct()
- 8.9.x core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php \Drupal\jsonapi\Exception\UnprocessableHttpEntityException::__construct()
- 11.x core/modules/jsonapi/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
-
core/
modules/ jsonapi/ src/ Exception/ UnprocessableHttpEntityException.php, line 45
Class
- UnprocessableHttpEntityException
- A class to represent a 422 - Unprocessable Entity Exception.
Namespace
Drupal\jsonapi\ExceptionCode
public function __construct(?\Exception $previous = NULL, array $headers = [], $code = 0) {
parent::__construct(422, "Unprocessable Entity: validation failed.", $previous, $headers, $code);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.