Skip to content

Commit

Permalink
Merge pull request #9 from tpeyrou-clever/dev
Browse files Browse the repository at this point in the history
Fix TrackingService::parseResponse when status code doesnt exist
  • Loading branch information
rvigneron64 authored Feb 18, 2025
2 parents a8967af + 899f468 commit 20e0bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Service/TrackingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function parseResponse($response): TrackingResponse
$body = $responses[0]['body'];
$status = $body['status'][0];
if ($status['code'] !== "0") {
throw new TrackingRequestException($status['message'], $status['code']);
throw new TrackingRequestException($status['message'], $status['code'] ?? 0);
}

$parcel = $body['parcel'];
Expand Down

0 comments on commit 20e0bbb

Please sign in to comment.