protected static function throwNotFoundHttpException(EntityInterface
$entity,
$resource_version_identifier) { $cacheability = CacheableMetadata::
createFromObject($entity)->
addCacheContexts(['url.path', 'url.query_args:' . ResourceVersionRouteEnhancer::RESOURCE_VERSION_QUERY_PARAMETER
]);
$reason =
sprintf('The requested version, identified by `%s`, could not be found.',
$resource_version_identifier);
throw new CacheableNotFoundHttpException($cacheability,
$reason);
} /**
* Throws a cacheable error exception.
*
* @param string $resource_version_identifier
* The user input for the revision negotiation.
*
* @throws \Drupal\Core\Http\Exception\CacheableBadRequestHttpException
*/
protected static function throwBadRequestHttpException($resource_version_identifier) {