return;
} $event->
stopPropagation();
$salesChannelId =
$request->attributes->
get(PlatformRequest::ATTRIBUTE_SALES_CHANNEL_ID, ''
);
$domainId =
$request->attributes->
get(SalesChannelRequest::ATTRIBUTE_DOMAIN_ID, ''
);
$languageId =
$request->attributes->
get(PlatformRequest::HEADER_LANGUAGE_ID, ''
);
if (!
$request->attributes->
has(PlatformRequest::ATTRIBUTE_SALES_CHANNEL_CONTEXT_OBJECT
)) { // When no sales-channel context is resolved, we need to resolve it now.
$this->
setSalesChannelContext($request);
} $is404StatusCode =
$event->
getThrowable() instanceof HttpException &&
$event->
getThrowable()->
getStatusCode() === Response::HTTP_NOT_FOUND;
// If the exception is not a 404 status code, we don't need to cache it.
if (!
$is404StatusCode) { $event->
setResponse($this->controller->
error( $event->
getThrowable(),
$request,
$event->
getRequest()->
get(PlatformRequest::ATTRIBUTE_SALES_CHANNEL_CONTEXT_OBJECT
) ));