Include the JSON encoded response, when throwing an unknown response format in mouser provider

Should help to debug issue #820
This commit is contained in:
Jan Böhmer 2025-01-05 22:15:12 +01:00
parent f75704f77c
commit 6bdf3d891a

View file

@ -205,7 +205,7 @@ class MouserProvider implements InfoProviderInterface
if (isset($arr['SearchResults'])) { if (isset($arr['SearchResults'])) {
$products = $arr['SearchResults']['Parts'] ?? []; $products = $arr['SearchResults']['Parts'] ?? [];
} else { } else {
throw new \RuntimeException('Unknown response format'); throw new \RuntimeException('Unknown response format: ' .json_encode($arr, JSON_THROW_ON_ERROR));
} }
$result = []; $result = [];