You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using paging and no products found for next iteration, system does not return "0" or "null" response instead generates error. I have fixed it by adding a check in "Endpoint/Product/Response/GetProducts.php"
protected function processDecodedResponse(array $responseData)
{
parent::processDecodedResponse($responseData);
$this->products = new ProductCollection([]);
if($responseData['Body']['Products']==""){ //my check
return 0;
}else{
if (isset($this->body[static::PRODUCTS_KEY])) {
if (isset($this->body[static::PRODUCTS_KEY][static::PRODUCT_KEY][Product::SELLER_SKU])) {
$products = [ $this->body[static::PRODUCTS_KEY][static::PRODUCT_KEY] ];
} else {
$products = $this->body[static::PRODUCTS_KEY][static::PRODUCT_KEY];
}
foreach ($products as $product) {
$this->products->add(new Product($product));
}
}
}
}
The text was updated successfully, but these errors were encountered:
When using paging and no products found for next iteration, system does not return "0" or "null" response instead generates error. I have fixed it by adding a check in "Endpoint/Product/Response/GetProducts.php"
protected function processDecodedResponse(array $responseData)
{
parent::processDecodedResponse($responseData);
The text was updated successfully, but these errors were encountered: