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

What should happen when invalid data is provided? #265

Closed
rsolomakhin opened this issue Sep 16, 2016 · 3 comments
Closed

What should happen when invalid data is provided? #265

rsolomakhin opened this issue Sep 16, 2016 · 3 comments

Comments

@rsolomakhin
Copy link
Collaborator

The spec does not explicitly state that the browser should throw an exception when, for example, invalid amount is provided.

total: {label: "total", amount: {currency: "USD", value: "x"}}

Should the spec explicitly specify that an exception must be thrown or is that implicit?

@adrianba
Copy link
Contributor

This was fixed in #256. If this change was insufficient then please reopen this issue with a specific proposal for what needs to be changed.

@rsolomakhin
Copy link
Collaborator Author

I propose that the following text be added:

"If the value is invalid, UA should throw TypeError."

Is there a better error type for signifying invalid input parameters?

@adrianba
Copy link
Contributor

This is in the spec - for example see steps 5, 7, 8, 11, and 13 of the constructor algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants