mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
port fix from 1.0 for display exceptions not returning correctly on api
This commit is contained in:
@@ -57,7 +57,7 @@ class DisplayException extends PterodactylException implements HttpExceptionInte
|
||||
*/
|
||||
public function render(Request $request): JsonResponse|RedirectResponse
|
||||
{
|
||||
if ($request->expectsJson()) {
|
||||
if ($request->expectsJson() || $request->is('api/*')) {
|
||||
return response()->json(ApiErrorResponse::toArray($this), $this->getStatusCode(), $this->getHeaders());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user