dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
49 stars 63 forks source link

Notice: Trying to get property 'status' of non-object #569

Closed beechyrb closed 3 years ago

beechyrb commented 3 years ago
  1. Magento Commerce 2.3.6
  2. Dotmailer Magento 2 Extension 4.9.1

We are getting the following cron error every once in a while. Unfortunately, I am unable to find the root cause but I am sure isset($response->status) or is_object($response->status) would do the trick to prevent the error.

job code: ddg_automation_importer Notice: Trying to get property 'status' of non-object in /app/xxxxxxxxxx/vendor/dotmailer/dotmailer-magento2-extension/Model/Sync/Importer/ImporterProgressHandler.php on line 152

sta1r commented 3 years ago

@beechyrb Thanks for this, we'll take a look.

sta1r commented 3 years ago

Hi - we've made a change to prevent this error, please see https://github.com/dotmailer/dotmailer-magento2-extension/commit/83b108817bbba288836383f9facf55e26fa629c2.

If the root cause happens again you'll get a failed importer row, potentially with a curl error attached if there was one.

We're going to release this next week with v4.11.0.

sta1r commented 3 years ago

Released.