Skip to content

Commit 7d864f9

Browse files
committed
Fix incorrect respond call (parameter order)
1 parent 075d9d5 commit 7d864f9

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/ApiResponseManager.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,7 @@ public function respond(
202202
],
203203
'errors' => $allErrors,
204204
];
205-
206-
// // Log the response
207-
// $this->errorLogger->logInfo('A client was responded to:' . json_encode($response, JSON_THROW_ON_ERROR));
208-
205+
209206
// Set security-related headers
210207
$this->setSecurityHeaders();
211208

@@ -233,13 +230,6 @@ public function respond(
233230
*/
234231
public function bailOut(?int $statusCode = 400): never
235232
{
236-
// Log the bailout
237-
$this->errorLogger->warning('Bailing out', [
238-
'status' => $statusCode,
239-
'messages' => $this->globalMessages,
240-
'errors' => $this->globalErrors,
241-
]);
242-
243233
// Ensure that globalMessages and globalErrors are initialized as arrays
244234
$this->globalMessages = $this->globalMessages ?? [];
245235
$this->globalErrors = $this->globalErrors ?? [];
@@ -254,9 +244,7 @@ public function bailOut(?int $statusCode = 400): never
254244
$this->respond(
255245
false, // failure
256246
[], // no data
257-
$this->globalMessages, // messages
258-
$this->globalErrors, // errors
259-
$statusCode // response code
247+
$statusCode // response code
260248
);
261249
}
262250

0 commit comments

Comments
 (0)