Skip to content

Commit cfb5282

Browse files
committed
Add error code to unexpected result error
1 parent 56f9732 commit cfb5282

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Picqer/Carriers/SendCloud/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public function parseResponse(Response $response)
184184
$resultArray = json_decode($response->getBody()->getContents(), true);
185185

186186
if (! is_array($resultArray)) {
187-
throw new SendCloudApiException('SendCloud error: Unexpected result: ' . $response->getBody()->getContents());
187+
throw new SendCloudApiException(sprintf('SendCloud error %s: %s', $response->getStatusCode(), $response->getBody()->getContents()));
188188
}
189189

190190
if (array_key_exists('error', $resultArray)

0 commit comments

Comments
 (0)