$response->
setStatusCode($targetErrorCode);
// Page not Found should not get logged in error handler
$response->
unsetExceptions();
switch ($targetEmotionId) { case -2:
case null:
$this->
forward( $this->
get('front'
)->
Dispatcher()->
getDefaultAction(),
$this->
get('front'
)->
Dispatcher()->
getDefaultControllerName() );
break;
case -1:
$this->
forward('genericError', null, null,
['code' =>
$targetErrorCode]);
break;
default:
// Try to load the emotion landingpage, render default error in case it is unavailable
try { $result =
$this->
get('shopware.emotion.emotion_landingpage_loader'
)->
load( $targetEmotionId,
$this->
get(ContextServiceInterface::
class)->
getShopContext() );