From 6bdf3d891af97b8fdee046309754ce81fcd3af23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 5 Jan 2025 22:15:12 +0100 Subject: [PATCH] Include the JSON encoded response, when throwing an unknown response format in mouser provider Should help to debug issue #820 --- src/Services/InfoProviderSystem/Providers/MouserProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/InfoProviderSystem/Providers/MouserProvider.php b/src/Services/InfoProviderSystem/Providers/MouserProvider.php index 84f5d65b..c36fab66 100644 --- a/src/Services/InfoProviderSystem/Providers/MouserProvider.php +++ b/src/Services/InfoProviderSystem/Providers/MouserProvider.php @@ -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 = [];