<?php

namespace Pterodactyl\Exceptions\Repository;

class RecordNotFoundException extends RepositoryException
{
    /**
     * Handle request to render this exception to a user. Returns the default
     * 404 page view.
     *
     * @param \Illuminate\Http\Request $request
     * @return \Illuminate\Http\Response
     */
    public function render($request)
    {
        if (! config('app.debug')) {
            return response()->view('errors.404', [], 404);
        }
    }
}

<?php

namespace Pterodactyl\Exceptions\Repository;

use Illuminate\Http\Response;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;

class RecordNotFoundException extends RepositoryException implements HttpExceptionInterface
{
    /**
     * Returns the status code.
     *
     * @return int
     */
    public function getStatusCode()
    {
        return Response::HTTP_NOT_FOUND;
    }

    /**
     * Returns response headers.
     *
     * @return array
     */
    public function getHeaders()
    {
        return [];
    }
}

Use the HttpExceptionInterface rather than a render function here
Use the HttpExceptionInterface rather than a render function here
