Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get returns causes exception "Value is not a valid ISO 8601 format." #6

Closed
DangerLifter opened this issue Oct 22, 2019 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@DangerLifter
Copy link

DangerLifter commented Oct 22, 2019

On call "get returns' bol.com Api returns some dates in format "2019-05-15T17:09:38.137+02:00" which causes Assert\InvalidArgumentException: Value is not a valid ISO 8601 format.
Problem with milliseconds part in date time string.

Here is final stack in one of my cases:

() at app/vendor/beberlei/assert/lib/Assert/Assertion.php:2752
Assert\Assertion::createException() at app/vendor/beberlei/assert/lib/Assert/Assertion.php:2403
Assert\Assertion::date() at app/vendor/bol-com/retailer-api/src/Model/DateTime.php:16
BolCom\RetailerApi\Model\DateTime->__construct() at app/vendor/bol-com/retailer-api/src/Model/DateTime.php:30
BolCom\RetailerApi\Model\DateTime::fromString() at app/src/Command/Returns/ImportCommand.php:37

And one more similar place:

In Assertion.php line 2752:

[Assert\InvalidArgumentException (214)]
Value is not a valid ISO 8601 format.

Exception trace:
() at app/vendor/beberlei/assert/lib/Assert/Assertion.php:2752
Assert\Assertion::createException() at app/vendor/beberlei/assert/lib/Assert/Assertion.php:2403
Assert\Assertion::date() at pp/vendor/bol-com/retailer-api/src/Model/DateTime.php:19
BolCom\RetailerApi\Model\DateTime->__construct() at app/vendor/bol-com/retailer-api/src/Model/DateTime.php:33
BolCom\RetailerApi\Model\DateTime::fromString() at app/vendor/bol-com/retailer-api/src/Model/Rma/ReducedReturnItem.php:243
BolCom\RetailerApi\Model\Rma\ReducedReturnItem::fromArray() at app/vendor/bol-com/retailer-api/src/Model/Rma/ReturnItemList.php:53
BolCom\RetailerApi\Model\Rma\ReturnItemList::fromArray() at app/vendor/bol-com/retailer-api/src/Handler/Rma/GetAllReturnsHandler.php:54
BolCom\RetailerApi\Handler\Rma\GetAllReturnsHandler->__invoke() at app/vendor/bol-com/retailer-api/src/Infrastructure/MessageBus.php:111

@JeroenVanLeusden JeroenVanLeusden self-assigned this Oct 23, 2019
@JeroenVanLeusden JeroenVanLeusden added the bug Something isn't working label Oct 23, 2019
@JeroenVanLeusden
Copy link

@DangerLifter Dates should be converted already in https://github.com/ho-nl/BolCom_RetailerApi/blob/master/src/Handler/Rma/GetAllReturnsHandler.php#L50-L51

Are you able to create a failing test for this?

@DangerLifter
Copy link
Author

DangerLifter commented Oct 24, 2019

Handler processes "registrationDateTime" but issue with "processingDateTime"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants