Skip to content

[Ratings & Reviews Prompt] Promise rejection reasons must be exceptions, and used for exceptional situations #420

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

Open
domenic opened this issue Dec 3, 2020 · 1 comment

Comments

@domenic
Copy link

domenic commented Dec 3, 2020

The current explainer rejects the promise in several non-exceptional situations. You can tell, because instead of using Error objects for those cases, it instead using strings.

This is contrary to how promises generally work on the web platform. See:

Instead the API should fulfill in non-exceptional cases, including completed/deferred/disallowed, and only reject in the error case. Perhaps it could fulfill with something like { status: "completed" } or { status: "handed-off", catalog: "https://play.google.com/" }

@aarongustafson
Copy link
Member

Thanks for that feedback @domenic. This is the first Promise-based API I’ve developed for the platform, so I appreciate the guidance.

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

No branches or pull requests

3 participants