return error message directly when requested with POST
This commit is contained in:
parent
24137cf2a9
commit
233b2d4e39
@ -108,6 +108,10 @@ class Handler extends ExceptionHandler
|
||||
*/
|
||||
protected function renderExceptionInBrief(Exception $e)
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
||||
return response()->view('errors.exception', ['message' => $e->getMessage()]);
|
||||
} else {
|
||||
return $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user