From 954f82fa9166e847e4d5e77daa69488a8b5ebb2a Mon Sep 17 00:00:00 2001 From: "maxime.batista" Date: Wed, 17 Jan 2024 17:37:43 +0100 Subject: [PATCH] WIP --- src/Api/APIControl.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Api/APIControl.php b/src/Api/APIControl.php index 260575a..751fbfb 100644 --- a/src/Api/APIControl.php +++ b/src/Api/APIControl.php @@ -4,6 +4,7 @@ namespace IQBall\Api; use IQBall\Core\Control; use IQBall\Core\ControlSchemaErrorResponseFactory; +use IQBall\Core\Http\HttpCodes; use IQBall\Core\Http\HttpRequest; use IQBall\Core\Http\HttpResponse; use IQBall\Core\Http\JsonHttpResponse; @@ -13,7 +14,7 @@ class APIControl { private static function errorFactory(): ControlSchemaErrorResponseFactory { return new class () implements ControlSchemaErrorResponseFactory { public function apply(array $failures): HttpResponse { - return new JsonHttpResponse($failures); + return new JsonHttpResponse($failures, HttpCodes::BAD_REQUEST); } }; }