minor fixes on products

This commit is contained in:
2026-05-04 00:34:20 +02:00
parent a30a90741e
commit a3498b2d7e

View File

@@ -54,11 +54,17 @@ public class ProviderService {
headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));
headers.setBearerAuth(token);
LinkedHashMap response = this.restService.getAs(
LinkedHashMap response;
try {
response = this.restService.getAs(
aggregatorUrl + "/merchant/aggregation/products?size=20&clientUid=" + providerId.toString(),
headers,
LinkedHashMap.class
);
} catch (Exception e) {
log.error("Error fetching products for provider " + providerId, e);
return Collections.emptyList();
}
LinkedHashMap body = (LinkedHashMap) response.get("body");
List<LinkedHashMap> content = (List<LinkedHashMap>) body.get("content");