-
Notifications
You must be signed in to change notification settings - Fork 60
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
Error Handling for common conditions #37
Comments
This should work. |
@nirmay This is good. So if i have to generalize this - In case of this error - on_init the response will have the actual available quantities (less then or equal to what is asked In init). This is right ? |
In my proposal, the items array should include only those items that fail the inventory quantity check. |
Does this cover if we have two error IDs , quantity error and price error , we will need to display multiple error messages for 2 different items in the same checkout page. |
good point, suggest you file a separate bug to address that. |
I am not sure but currently i don't think that we get any price update error object. Buyer app checks the price at their end and the price what we received in breakup object of /on_init response. do we need different error code for price update? |
I was talking more of making the error object generic so that we can handle multiple errors and item-wise , so that anytime in future, different types of errors can be reported. Buyer app can read list of errors and make provision to display it appropriately to the user. |
@nirmay @mahoriR - agree that we can use this approach only to indicate inventory quantity check failing; |
@nirmay @BLR-0118 @VidyaGF @mahoriR https://docs.google.com/document/d/19dHfFegVwWIYdnVvE8uUXPZsTl9MjOLjsUv8TAXU5Yw/edit?usp=sharing |
@BLR-0118 Yes Supriyo , we have generic error handler to show these messages and we are showing the other error messages like "delivery agent not available" , "price has been updated" through that handler only. |
Just returning the error with message "Item quantity unavailable" is not sufficient for BAP.
In case, there are many items added to the cart, BAP will need to present to the user, which item(s) are low on quantity.
I would like to propose, along with error, BPP will return following in the on_init payload, along with "error" object,
message.order.items (which is an array) and BPP sends back current quantity as per below,
{ "id": "73661421", "quantity": { "count": 0 } },
@BLR-0118 pls review,
The text was updated successfully, but these errors were encountered: