10 months ago

Exception handler 500 error

Posted 10 months ago by fredmarks

I have added an some custom exception handling for ajax request


public function render($request, Exception $exception)

  //do something different when its an ajax call
  if ($request->ajax() && in_array($exception->getStatusCode(), array(403, 419, 404, 409))) {

      //retun ajax respone


    return parent::render($request, $exception);

This is all working fine, however when my code generates a 500 error (e.g. Method does not exist) no output is generated in either debugbar or chrome developer tools.

The only place I now see the exception message is in the log file.

Any ideas how to get around this, so that I can still get my debugging exceptions for 500 errors?

Please sign in or create an account to participate in this conversation.