-
Notifications
You must be signed in to change notification settings - Fork 135
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
Why is the "shippingType" member of PaymentOptions not a PaymentShippingType? #337
Comments
Is this referring to these particular steps:
I'm trying to recall the discussion we had around this. I can't quite recall why we didn't throw. Reading this again, throwing seems good to me. @adrianba do you recall? |
No, it's referring to
|
Ahhh. This is what happens when I don't read the issue title closely enough. 😨 Throwing seems pretty serious for what is effectively a string in the UI. |
I mean, it seems better than displaying "shipping" when you meant "pickup" (but you mistyped it as "pick-up"). You can imagine some irate customers waiting for their package to ship for weeks, not knowing it's waiting at the store for pickup... |
Can we get a decision on this, one way or the other? I think using an enum and following the usual platform enum rules makes more sense than creating a bespoke behavior here because we're afraid of being too serious. But it doesn't really matter much, we should just make a decision so we can close the issue. If we decide against using an enum we should add a note to the spec saying that this is an intentional violation of the usual platform semantics in order to be more tolerant of mistakes. |
Is this a topic that deserves attention on a WG call? Ian |
Chatted with Domenic about this. Decided throwing is best for clarity and future use cases. |
The spec has a note about replacing invalid values with "shipping" is supposed to let a page detect when it's using an unsupported shipping type, but an exception from the dictionary conversion would be just as detectable, no?
The text was updated successfully, but these errors were encountered: