Skip to content

Commit

Permalink
use STATUS_CODES message in produceErrorResponse response prop
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed May 29, 2024
1 parent 2bc14d2 commit a85418a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion allevents/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function produceErrorResponse(int $statusCode, string $description): string
header($_SERVER[ "SERVER_PROTOCOL" ] . STATUS_CODES[ $statusCode ], true, $statusCode);
$message = new \stdClass();
$message->status = "ERROR";
$message->response = $statusCode === 404 ? "Resource not Found" : "Service Unavailable";
$message->response = STATUS_CODES[ $statusCode ];
$message->description = $description;
return json_encode($message);
}
Expand Down

0 comments on commit a85418a

Please sign in to comment.