mirror of
https://github.com/cydrobolt/polr.git
synced 2024-09-18 19:52:26 +02:00
Use proper HTTP response code for pretty 500 page; reduce line length
This commit is contained in:
parent
09724050c2
commit
c0ce7d4d6e
@ -60,11 +60,15 @@ class Handler extends ExceptionHandler {
|
||||
|
||||
if ($status_code == 500) {
|
||||
// Render a nice error page for 500s
|
||||
return view('errors.500');
|
||||
return response(view('errors.500'), 500);
|
||||
}
|
||||
else {
|
||||
// If not 500, render generic page
|
||||
return response(view('errors.generic', ['status_code' => $status_code, 'status_message' => $status_message]), $status_code);
|
||||
return response(
|
||||
view('errors.generic', [
|
||||
'status_code' => $status_code,
|
||||
'status_message' => $status_message
|
||||
]), $status_code);
|
||||
}
|
||||
}
|
||||
if ($e instanceof ApiException) {
|
||||
|
Loading…
Reference in New Issue
Block a user