Skip to content

Commit 5585cdf

Browse files
committed
Fixed storage-types to use proper StorageError
1 parent 11e5d43 commit 5585cdf

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

common/api-review/storage.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export class StorageError extends FirebaseError {
229229
}
230230

231231
// @public
232-
export const enum StorageErrorCode {
232+
export enum StorageErrorCode {
233233
// (undocumented)
234234
APP_DELETED = "app-deleted",
235235
// (undocumented)

packages/storage-types/index.d.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
*/
1717

1818
import { FirebaseApp } from '@firebase/app-types';
19+
import { StorageError as FirebaseStorageError } from '@firebase/storage';
1920
import {
2021
CompleteFn,
2122
EmulatorMockTokenOptions,
22-
FirebaseError,
2323
NextFn,
2424
Unsubscribe
2525
} from '@firebase/util';
@@ -91,10 +91,6 @@ export interface UploadMetadata extends SettableMetadata {
9191
md5Hash?: string | null;
9292
}
9393

94-
interface FirebaseStorageError extends FirebaseError {
95-
serverResponse: string | null;
96-
}
97-
9894
export interface StorageObserver<T> {
9995
next?: NextFn<T> | null;
10096
error?: (error: FirebaseStorageError) => void | null;

packages/storage/src/implementation/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const errors = {};
8585
* @public
8686
* Error codes that can be attached to `StorageError`s.
8787
*/
88-
export const enum StorageErrorCode {
88+
export enum StorageErrorCode {
8989
// Shared between all platforms
9090
UNKNOWN = 'unknown',
9191
OBJECT_NOT_FOUND = 'object-not-found',

0 commit comments

Comments
 (0)