StorageError class
Stay organized with collections
Save and categorize content based on your preferences.
An error returned by the Firebase Storage SDK.
Signature:
export declare class StorageError extends FirebaseError
Extends: FirebaseError
Constructors
Properties
Property |
Modifiers |
Type |
Description |
customData |
|
{ serverResponse: string | null; } |
Stores custom error data unique to the StorageError . |
serverResponse |
|
null | string |
Optional response message that was added by the server. |
status |
|
number |
|
Methods
Method |
Modifiers |
Description |
_codeEquals(code) |
|
Compares a StorageErrorCode against this error's code, filtering out the prefix. |
StorageError.(constructor)
Constructs a new instance of the StorageError
class
Signature:
constructor(code: StorageErrorCode, message: string, status_?: number);
Parameters
Parameter |
Type |
Description |
code |
StorageErrorCode |
A StorageErrorCode string to be prefixed with 'storage/' and added to the end of the message. |
message |
string |
Error message. |
status_ |
number |
Corresponding HTTP Status Code |
StorageError.customData
Stores custom error data unique to the StorageError
.
Signature:
customData: {
serverResponse: string | null;
};
StorageError.serverResponse
Optional response message that was added by the server.
Signature:
get serverResponse(): null | string;
set serverResponse(serverResponse: string | null);
StorageError.status
Signature:
get status(): number;
set status(status: number);
StorageError._codeEquals()
Compares a StorageErrorCode
against this error's code, filtering out the prefix.
Signature:
_codeEquals(code: StorageErrorCode): boolean;
Parameters
Returns:
boolean
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-19 UTC.
[null,null,["Last updated 2024-01-19 UTC."],[],[],null,["# StorageError class\n\nAn error returned by the Firebase Storage SDK.\n\n**Signature:** \n\n export declare class StorageError extends FirebaseError \n\n**Extends:** [FirebaseError](./util.firebaseerror.md#firebaseerror_class)\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|--------------------------------------------------------------------------------------------|-----------|-------------------------------------------------------|\n| [(constructor)(code, message, status_)](./storage.storageerror.md#storageerrorconstructor) | | Constructs a new instance of the `StorageError` class |\n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|------------------------------------------------------------------------|-----------|-------------------------------------|---------------------------------------------------------|\n| [customData](./storage.storageerror.md#storageerrorcustomdata) | | { serverResponse: string \\| null; } | Stores custom error data unique to the `StorageError`. |\n| [serverResponse](./storage.storageerror.md#storageerrorserverresponse) | | null \\| string | Optional response message that was added by the server. |\n| [status](./storage.storageerror.md#storageerrorstatus) | | number | |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|------------------------------------------------------------------------|-----------|------------------------------------------------------------------------------------|\n| [_codeEquals(code)](./storage.storageerror.md#storageerror_codeequals) | | Compares a `StorageErrorCode` against this error's code, filtering out the prefix. |\n\nStorageError.(constructor)\n--------------------------\n\nConstructs a new instance of the `StorageError` class\n\n**Signature:** \n\n constructor(code: StorageErrorCode, message: string, status_?: number);\n\n#### Parameters\n\n| Parameter | Type | Description |\n|-----------|---------------------------------------------------|-------------------------------------------------------------------------------------------------|\n| code | [StorageErrorCode](./storage.md#storageerrorcode) | A `StorageErrorCode` string to be prefixed with 'storage/' and added to the end of the message. |\n| message | string | Error message. |\n| status_ | number | Corresponding HTTP Status Code |\n\nStorageError.customData\n-----------------------\n\nStores custom error data unique to the `StorageError`.\n\n**Signature:** \n\n customData: {\n serverResponse: string | null;\n };\n\nStorageError.serverResponse\n---------------------------\n\nOptional response message that was added by the server.\n\n**Signature:** \n\n get serverResponse(): null | string;\n\n set serverResponse(serverResponse: string | null);\n\nStorageError.status\n-------------------\n\n**Signature:** \n\n get status(): number;\n\n set status(status: number);\n\nStorageError._codeEquals()\n--------------------------\n\nCompares a `StorageErrorCode` against this error's code, filtering out the prefix.\n\n**Signature:** \n\n _codeEquals(code: StorageErrorCode): boolean;\n\n#### Parameters\n\n| Parameter | Type | Description |\n|-----------|---------------------------------------------------|-------------|\n| code | [StorageErrorCode](./storage.md#storageerrorcode) | |\n\n**Returns:**\n\nboolean"]]