You are here

public function HttpExceptionNormalizer::normalize in JSON:API 8.2

Same name and namespace in other branches
  1. 8 src/Normalizer/HttpExceptionNormalizer.php \Drupal\jsonapi\Normalizer\HttpExceptionNormalizer::normalize()

File

src/Normalizer/HttpExceptionNormalizer.php, line 51

Class

HttpExceptionNormalizer
Normalizes an HttpException in compliance with the JSON:API specification.

Namespace

Drupal\jsonapi\Normalizer

Code

public function normalize($object, $format = NULL, array $context = []) {
  return new HttpExceptionNormalizerValue(new CacheableMetadata(), static::rasterizeValueRecursive($this
    ->buildErrorObjects($object)));
}