-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Potential BugPotential bugs or bugfixes, that needs to be reproduced.Potential bugs or bugfixes, that needs to be reproduced.
Description
Sylius version(s) affected
2.1.7
Description
When POSTing on /api/v2/shop/orders/{cartToken}/items (route is sylius_api_shop_order_order_item_post) and order with cartToken cannot be found, Sylius throws a 500 error, like this one:
{
"@context": "\/api\/v2\/contexts\/Error",
"@id": "\/api\/v2\/errors\/500",
"@type": "hydra:Error",
"detail": "Cart with given token has not been found.",
"status": 500,
"type": "\/errors\/500",
"trace": ["..."],
"hydra:description": "Cart with given token has not been found.",
"hydra:title": "An error occurred"
}I guess it should be a 4**, am I right?
How to reproduce
Create an order with:
POST /api/v2/shop/orders/not_a_thing/items
Content-Type: application/ld+json
{
"productVariant": "{{existingProductVariant}}",
"quantity": 1
}
Possible Solution
No response
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Potential BugPotential bugs or bugfixes, that needs to be reproduced.Potential bugs or bugfixes, that needs to be reproduced.