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

Export StorageError #6944

Closed
sassanh opened this issue Jan 13, 2023 · 0 comments · Fixed by #6974
Closed

Export StorageError #6944

sassanh opened this issue Jan 13, 2023 · 0 comments · Fixed by #6974
Assignees

Comments

@sassanh
Copy link

sassanh commented Jan 13, 2023

[REQUIRED] Describe your environment

  • Operating System version: NA
  • Browser version: NA
  • Firebase SDK version: 0.10.0
  • Firebase Product: storage

[REQUIRED] Describe the problem

I noticed when a file doesn't exit in a Firestore collection, it throws an instance of StorageError class, it used to be FirebaseError. Now the problem is StorageError is not exported in storage-public.d.ts (only its interface is exported) so I cannot check the catches error with

error instanceof StorageError

Steps to reproduce:

Try to import StorageError class, the interface is importable, but we need to import the class.

Relevant Code:

import { StorageError } from '@firebase/storage';

console.log(null instance StorageError);
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.

3 participants