diff --git a/app/Exceptions/Repository/RecordNotFoundException.php b/app/Exceptions/Repository/RecordNotFoundException.php index f449faa4..53cfa222 100644 --- a/app/Exceptions/Repository/RecordNotFoundException.php +++ b/app/Exceptions/Repository/RecordNotFoundException.php @@ -2,19 +2,28 @@ namespace Pterodactyl\Exceptions\Repository; -class RecordNotFoundException extends RepositoryException +use Illuminate\Http\Response; +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; + +class RecordNotFoundException extends RepositoryException implements HttpExceptionInterface { /** - * Handle request to render this exception to a user. Returns the default - * 404 page view. + * Returns the status code. * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response + * @return int */ - public function render($request) + public function getStatusCode() { - if (! config('app.debug')) { - return response()->view('errors.404', [], 404); - } + return Response::HTTP_NOT_FOUND; + } + + /** + * Returns response headers. + * + * @return array + */ + public function getHeaders() + { + return []; } }