Skip to content

Commit 6bdf3d8

Browse files
committed
Include the JSON encoded response, when throwing an unknown response format in mouser provider
Should help to debug issue #820
1 parent f75704f commit 6bdf3d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Services/InfoProviderSystem/Providers/MouserProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ private function responseToDTOArray(ResponseInterface $response): array
205205
if (isset($arr['SearchResults'])) {
206206
$products = $arr['SearchResults']['Parts'] ?? [];
207207
} else {
208-
throw new \RuntimeException('Unknown response format');
208+
throw new \RuntimeException('Unknown response format: ' .json_encode($arr, JSON_THROW_ON_ERROR));
209209
}
210210

211211
$result = [];

0 commit comments

Comments
 (0)