Skip to content

Commit 3286d74

Browse files
committed
Separate if statements and improve success log
1 parent cbec8a9 commit 3286d74

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Api/AbstractClient.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@ protected function request(
4444
);
4545

4646
$status = $response->getStatusCode();
47+
4748
if ($status === Response::HTTP_TOO_MANY_REQUESTS && !$retrial) {
4849
sleep(1);
4950

5051
return $this->request($path, $method, $options, true);
5152
}
53+
5254
if ($status >= Response::HTTP_OK && $status < Response::HTTP_MULTIPLE_CHOICES) {
5355
$this->logger->debug(sprintf(
54-
'200 User.com API request',
56+
sprintf('%s User.com API request', $status),
5557
), [
5658
'path' => $path,
5759
'method' => $method,

0 commit comments

Comments
 (0)