Skip to content

Commit 20e0bbb

Browse files
authoredFeb 18, 2025
Merge pull request #9 from tpeyrou-clever/dev
Fix TrackingService::parseResponse when status code doesnt exist
2 parents a8967af + 899f468 commit 20e0bbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎Service/TrackingService.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function parseResponse($response): TrackingResponse
5151
$body = $responses[0]['body'];
5252
$status = $body['status'][0];
5353
if ($status['code'] !== "0") {
54-
throw new TrackingRequestException($status['message'], $status['code']);
54+
throw new TrackingRequestException($status['message'], $status['code'] ?? 0);
5555
}
5656

5757
$parcel = $body['parcel'];

0 commit comments

Comments
 (0)
Please sign in to comment.