Throw an exception if canopy does not return a product

This commit is contained in:
Jan Böhmer 2026-02-24 20:30:29 +01:00
parent a67f106bc6
commit a7a1026f9b

View file

@ -202,6 +202,10 @@ class CanopyProvider implements InfoProviderInterface
$product = $response->toArray()['data']['amazonProduct'];
if ($product === null) {
throw new \RuntimeException("Product with ASIN $id not found");
}
return new PartDetailDTO(
provider_key: $this->getProviderKey(),
provider_id: $product['asin'],