diff --git a/app/FrontController.php b/app/FrontController.php index bd5f13d..43bbec9 100644 --- a/app/FrontController.php +++ b/app/FrontController.php @@ -131,7 +131,11 @@ class FrontController } catch (Exception $e) { if (Config::get('DEBUG')) { if (!headers_sent()) { - header('HTTP/1.0 500 Internal Server Error'); + if ($e instanceof ErrorHTTPException) { + header($e->getHTTPHeader()); + } else { + header('HTTP/1.0 500 Internal Server Error'); + } } return ErrorHandler::showDebug($e); }