Skip to content

Commit 2d5551e

Browse files
committed
fix: handle 5xx http errors on the sdk
1 parent 4f70ed1 commit 2d5551e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Operations/Concerns/AssertsApiResponseErrors.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,9 @@ private function assertResponse(TransporterResponse $response): void
2525

2626
throw new OperationFailedException($data['error']);
2727
}
28+
29+
if ($response->statusCode > 500 && $response->statusCode < 600) {
30+
throw new OperationFailedException($data['error']);
31+
}
2832
}
2933
}

0 commit comments

Comments
 (0)