getParam('development', false); $type = $this->getParam('type', 'general_server_error'); $code = $this->getParam('code', 500); $message = $this->getParam('message', ''); $trace = $this->getParam('trace', []); $title = $this->getParam('title', 'Error'); $exception = $this->getParam('exception', null); $isSimpleMessage = true; $label = ''; $labelClass = ''; $buttons = []; $protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https'; $platform = Config::getParam('platform', []); $hostname = $platform['consoleHostname'] ?? ''; // TODO: remove this later if (System::getEnv('_APP_ENV') === 'development') { $hostname = 'localhost'; } $url = $protocol . '://' . $hostname; if($exception !== null && method_exists($exception, 'getCTAs')) { foreach ($exception->getCTAs() as $index => $cta) { $class = ($index === 0) ? 'bordered-button' : 'button'; $buttons[] = [ 'text' => $cta['label'], 'url' => $cta['url'], 'class' => $class ]; } } switch ($type) { case 'proxy_error_override': $type = ''; $label = 'Error ' . $code; $message = $code >= 500 ? 'An unexpected server error occured.' : 'An unexpected client error occured.'; switch($code) { case 401: $message = 'You must sign in to access this page.'; break; case 403: $message = 'You are not authorized to access this page.'; break; case 404: $message = 'The page you are looking for does not exist.'; break; case 504: $message = 'The server did not respond in time.'; break; case 501: $message = 'This page is not implemented yet.'; break; } break; case 'function_execute_permission_missing': $label = 'Execution not permitted'; $labelClass = 'warning'; break; case 'build_not_ready': $label = 'Deployment is still building'; $message = 'The page will update after the build completes.'; $labelClass = 'warning'; break; case 'build_failed': $label = 'Deployment build failed'; $message = 'An error occurred during the build process.'; $labelClass = 'error'; break; case 'rule_not_found': $label = 'Nothing is here yet'; $message = 'This page is empty, but you can make it yours.'; break; case 'deployment_not_found': $label = 'No active deployments'; $message = 'This page is empty, activate a deployment to make it live.'; break; case 'build_canceled': $label = 'Deployment build canceled'; $message = 'This build was canceled and won\'t be deployed.'; break; case 'general_route_not_found': $label = 'Page not found'; $message = 'The page you\'re looking for doesn\'t exist.'; break; default: $label = 'Error ' . $code; $message = $message; $isSimpleMessage = false; break; } ?> <?php echo $this->print($title); ?>
print($label); ?>

print($message); ?>

print($type); ?>