Skip to content

Commit

Permalink
chore: fix errorhandling
Browse files Browse the repository at this point in the history
  • Loading branch information
sytheveenje committed May 11, 2023
1 parent 77a8529 commit 494f9c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LaravelPostnlApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function confirmShipment(
if($response->successful()) {
return collect($response->object()->ResponseShipments)->first();
} else {
abort(500, 'PostNL API Error: '.$response->object()->ErrorMessage->Description);
abort(500, 'PostNL API Error: '.collect($response->object()->ResponseShipments)->first());
}

}
Expand Down

0 comments on commit 494f9c0

Please sign in to comment.