For example, I converter an entity in my update method in a controller,
public function show(Post $post): Response
According to the spec,
If no Post object is found, a 404 Response is generated;
Symfony will return a 404 response directly, but it only applies for a dev environment.
In a prod environment, it only throws an unhandled exception error.
Fatal error: Uncaught Symfony\Component\HttpKernel\Exception\NotFoundHttpException: App\Entity\Post object not found by the @ParamConverter annotation.
How can I handle the exception in a prod environment?