notFoundResponse($e); } } private function notFoundResponse(NotFoundException $e) { $response = ['error' => get_class($e), 'message' => $e->getMessage()]; return new JSONResponse($response, Http::STATUS_NOT_FOUND); } }