> For the complete documentation index, see [llms.txt](https://lorvent.gitbook.io/josh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lorvent.gitbook.io/josh/laravel_51/customize_whoops.md).

# Customize whoops,...

If you would like to replace that message with 500.blade.php file shipped with Josh, please follow below tutorial.

to do so, we should override `convertExceptionToResponse` method in `app/Exceptions/Handler.php`

add below code into your `app/Exceptions/Handler.php`

```php
    /**
     * Convert the given exception into a Response instance.
     *
     * @param \Exception $e
     *
     * @return \Symfony\Component\HttpFoundation\Response
     */
    protected function convertExceptionToResponse(Exception $e)
    {
        $debug = config('app.debug', false);

        if ($debug) {
            return (new SymfonyDisplayer($debug))->createResponse($e);
        }

        return response()->view('admin.500');
    }
```

[credits](http://crynobone.com/posts/9/customizing-the-default-error-page-on-laravel-5.1)
