Skip to content

Commit

Permalink
The error page can't be rendered without the context
Browse files Browse the repository at this point in the history
  • Loading branch information
simoheinonen committed Mar 13, 2023
1 parent 022358a commit eef7c68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/EventListener/ExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public function onKernelException(ExceptionEvent $event)
return;
}

if (null === $this->adminContextProvider->getContext()) {
return;
}

// TODO: check why these custom error pages don't work
$event->setResponse($this->createExceptionResponse(FlattenException::create($exception)));
}
Expand Down

0 comments on commit eef7c68

Please sign in to comment.