Prevent crash when shipping profile is empty

Created on 13 September 2023, over 1 year ago
Updated 5 October 2023, about 1 year ago

When a shipment somehow ends up without a shipping address, this module code crashes with the following error:

TypeError: Return value of Drupal\commerce_easypost\Service\EasyPostManager::createEasyPostShipment() must be an instance of EasyPost\Shipment, array returned in Drupal\commerce_easypost\Service\EasyPostManager->createEasyPostShipment()

This method should fail gracefully and not totally crash.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States zengenuity

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024