Return API exceptions with proper content type

This commit is contained in:
Bernd Bestel
2020-08-29 19:29:24 +02:00
parent e93f58916e
commit 747660d909

View File

@@ -48,7 +48,7 @@ class ExceptionController extends BaseApiController
];
}
return $this->ApiResponse($response->withStatus($status), $data);
return $this->ApiResponse($response->withStatus($status)->withHeader('Content-Type', 'application/json'), $data);
}
if ($exception instanceof HttpNotFoundException)