Skip to content

Non error object is passed to Promise.reject #5141

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

Closed
yukukotani opened this issue Jul 10, 2021 · 0 comments · Fixed by #5145
Closed

Non error object is passed to Promise.reject #5141

yukukotani opened this issue Jul 10, 2021 · 0 comments · Fixed by #5145
Assignees
Milestone

Comments

@yukukotani
Copy link

yukukotani commented Jul 10, 2021

I can submit PR if this should be fixed.

[REQUIRED] Describe your environment

  • Operating System version: macOS Big Sur
  • Browser version: Google Chrome 91.0.4472.106
  • Firebase SDK version: 9.0.0-beta.6
  • Firebase Product: auth, remote-config

[REQUIRED] Describe the problem

Steps to reproduce:

firebase-js-sdk passes non-error object to Promise.reject. This causes getsentry/sentry-javascript#2546.

I have no idea to reproduce this, but Sentry receive unhandled promise rejection of non-error object.

Relevant Code:

onerror event is passed to reject. But onerror event is not an Error object. We need to wrap the event with Error class I think.

@sam-gc sam-gc self-assigned this Jul 12, 2021
@Feiyang1 Feiyang1 added this to the v9 GA milestone Jul 12, 2021
@firebase firebase locked and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants