Skip to content

Commit

Permalink
Include the JSON encoded response, when throwing an unknown response …
Browse files Browse the repository at this point in the history
…format in mouser provider

Should help to debug issue #820
  • Loading branch information
jbtronics committed Jan 5, 2025
1 parent f75704f commit 6bdf3d8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private function responseToDTOArray(ResponseInterface $response): array
if (isset($arr['SearchResults'])) {
$products = $arr['SearchResults']['Parts'] ?? [];
} else {
throw new \RuntimeException('Unknown response format');
throw new \RuntimeException('Unknown response format: ' .json_encode($arr, JSON_THROW_ON_ERROR));
}

$result = [];
Expand Down

0 comments on commit 6bdf3d8

Please sign in to comment.