mollie / magento2

Mollie Payments for Magento 2
https://www.mollie.com
Other
98 stars 50 forks source link

Improve Logging #652

Closed sprankhub closed 1 year ago

sprankhub commented 1 year ago

Describe the new feature

For debugging purposes, it would be very helpful to also log the order ID / order increment ID here both in the Mollie logging, but also in the thrown exception:

https://github.com/mollie/magento2/blob/d0c6b4f88c2e6a3791e237967b63c13778a7947f/Model/Client/Orders.php#L568-L571

Describe the solution to be implemented

Backend changes The logged error message needs to be extended.

Frontend changes None.

Additional context This is how the current error logging looks like:

main.CRITICAL: Magento\Framework\Exception\LocalizedException: Mollie-API: [2023-06-12T03:52:07+0000] Error executing API call (422: Unprocessable Entity): This order cannot be shipped.. Documentation: https://docs.mollie.com/reference/v2/shipments-api/create-shipment in ...

This way, I have no idea which order cannot be shipped.

Frank-Magmodules commented 1 year ago

Hello @sprankhub! (Simon)I hope you're doing well.

Just as we were about to release a new version, you opened this issue, and I'm pleased to inform you that we have included your fix in this release. You can now access it as version 2.27.0.

I will close this issue for now but feel free to respond on this ticket offcourse. If it doesn't fit your needs, you can reopen this ticket but i'm sure we've catched this now. Thank you very much for your contribution!