setStatus(Http::STATUS_FORBIDDEN); return $response; } #[PublicPage] #[NoCSRFRequired] #[FrontpageRoute(verb: 'GET', url: 'error/404')] public function error404(): TemplateResponse { $response = new TemplateResponse( 'core', '404', [], 'error' ); $response->setStatus(Http::STATUS_NOT_FOUND); return $response; } }