Skip to content

Commit 8407555

Browse files
committed
MAGETWO-94207: Cart GET for customer in REST returns 400 when cart not created
1 parent 1a968e0 commit 8407555

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/code/Magento/Quote/Model/Webapi/ParamOverriderCartId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function getOverriddenValue()
5656
}
5757
}
5858
} catch (NoSuchEntityException $e) {
59-
/* do nothing and just return null */
59+
throw new NoSuchEntityException(__('Current customer does not have an active cart.'));
6060
}
6161
return null;
6262
}

lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ interface ParamOverriderInterface
3434
* Returns the overridden value to use.
3535
*
3636
* @return string|int|null
37+
* @throws \Magento\Framework\Exception\NoSuchEntityException
3738
*/
3839
public function getOverriddenValue();
3940
}

0 commit comments

Comments
 (0)