firstred / postnl-api-php

PostNL API PHP bindings
https://postnl-php.readthedocs.io
MIT License
26 stars 37 forks source link

Invoke error description in thrown error message. #83

Closed BBrunekreeft closed 10 months ago

BBrunekreeft commented 1 year ago

When a CIF error is thrown, only the bare error message is thrown. Example: Validation failed for shipment: 3XXXXX002981228.

With this PR, the description is added, so it's a bit easier to find out why the validation failed: Example: Validation failed for shipment: 3XXXXX002981228 (Receiver street is required).

codecov[bot] commented 1 year ago

Codecov Report

Merging #83 (39f6b0b) into v2.0.x (91748ef) will increase coverage by 0.00%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/firstred/postnl-api-php/pull/83/graphs/tree.svg?width=650&height=150&src=pr&token=WdyfcT88x5&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Dekker)](https://app.codecov.io/gh/firstred/postnl-api-php/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Dekker) ```diff @@ Coverage Diff @@ ## v2.0.x #83 +/- ## ========================================= Coverage 69.05% 69.06% - Complexity 2209 2210 +1 ========================================= Files 124 124 Lines 6427 6429 +2 ========================================= + Hits 4438 4440 +2 Misses 1989 1989 ``` | [Files Changed](https://app.codecov.io/gh/firstred/postnl-api-php/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Dekker) | Coverage Δ | | |---|---|---| | [src/Exception/CifException.php](https://app.codecov.io/gh/firstred/postnl-api-php/pull/83?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Dekker#diff-c3JjL0V4Y2VwdGlvbi9DaWZFeGNlcHRpb24ucGhw) | `80.00% <100.00%> (+5.00%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/firstred/postnl-api-php/pull/83?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Dekker). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Dekker) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/firstred/postnl-api-php/pull/83?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Dekker). Last update [91748ef...39f6b0b](https://app.codecov.io/gh/firstred/postnl-api-php/pull/83?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Dekker). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Dekker).
firstred commented 10 months ago

Thanks a lot for this PR!