Skip to content

Commit

Permalink
Merge pull request Elgg#14789 from jeabakker/61-fixes
Browse files Browse the repository at this point in the history
fix(webservices): prevent double encoding during API exceptions
  • Loading branch information
jdalsem authored Feb 4, 2025
2 parents d554be4 + 3d6537b commit 719a4f3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function exceptionHandler(\Throwable $throwable): void {
$viewtype = elgg_get_viewtype();
switch ($viewtype) {
case 'json':
$response = new JsonResponse($output);
$response = new JsonResponse($output, ELGG_HTTP_OK, ['Content-Type' => 'application/json; charset=utf-8'], true);
break;
default:
$response = new Response($output);
Expand Down

0 comments on commit 719a4f3

Please sign in to comment.