Skip to content

Conversation

@tschallacka
Copy link

https://github.com/dpdconnect/php-sdk/blob/master/src/Common/ResourceClient.php#L87

uses list($status, $response). When an error is returned from dpd api, the entire shipping backend crashes, as an array index of 0 does not exist on an empty array.

By transforming the exception to a DpdException it gets caught by

} catch (DpdException $e) {
and gets handled properly by returning a cached instance.

And the magento2 shipping configuration page works.

https://github.com/dpdconnect/php-sdk/blob/master/src/Common/ResourceClient.php#L87

uses list($status, $response). When an error is returned from dpd api, the entire shipping backend crashes, as an array index of 0 does not exist on an empty array.

By transforming the exception to a DpdException it gets caught by https://github.com/dpdconnect/php-sdk/blob/12cabc0e204c56e5e9a7ff1fdde4492810cce6a2/src/Resources/Product.php#L34 and gets handled properly by returning a cached instance.

And the magento2 shipping configuration page works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant