-
Notifications
You must be signed in to change notification settings - Fork 874
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
Confusing error types #5754
Labels
Comments
Hey @laurentpayot Thanks for the request. We will look into this and see if we can improve. |
PR is pending review (but almost everyone is out for the holidays) |
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
To handle Firebase errors in a generic way I had to do dangerous type assertions to calm TypeScript down.
Firestore is a part of Firebase but, according to TypeScript,
FirestoreError
is not aFirebaseError
.But
AuthError
is aFirebaseError
, just likeStorageError
(looks like at least).But
StorageError
has a special attributeserverResponse
, not nested intocustomData
likeAuthError
does…Wat?
Here are the incriminated TypeScript interfaces:
So two little requests 🙏
FirestoreError
to actually be aFirebaseError
just like other Firebase errors?FirebaseError
, includingStorageError
, to simply havecode
,name
,message
andstack
attributes, and all other error details nested intocustomData
(as it was done forAuthError
)?That would make my day.
Cheers,
Laurent
The text was updated successfully, but these errors were encountered: