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

Document that chrome.runtime.lastError causes a rejection #12

Open
1 of 4 tasks
piedrahitapablo opened this issue Sep 8, 2020 · 1 comment
Open
1 of 4 tasks
Labels
documentation Improvement to the docs good first issue Good for newcomers help wanted Extra attention is needed

Comments

@piedrahitapablo
Copy link

piedrahitapablo commented Sep 8, 2020

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

If there is an error when executing the callbacks passed to the chrome API, chrome.runtime.lastError will be set. On the docs for this package or the source code I have not been able to find a reference to that situation. Also, as this uses promises, the check on the promise's then will not work since the lastError is only set inside the callback.

Your Proposal for Changes

Include a text explaining if this is needed or it's handled internally by you and the promise is rejected when lastError is set.

@jacksteamdev
Copy link
Contributor

@piedrahitapablo Good observation. This library uses chrome-promise, which rejects if lastError is set.

This would be a great documentation PR. 😉

@jacksteamdev jacksteamdev added documentation Improvement to the docs good first issue Good for newcomers help wanted Extra attention is needed labels Jan 14, 2021
@jacksteamdev jacksteamdev changed the title Is the check to chrome.runtime.lastError needed? Document that chrome.runtime.lastError causes a rejection May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvement to the docs good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants