docs-devsite/storage.storageerror.md
Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference
{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}
An error returned by the Firebase Storage SDK.
<b>Signature:</b>
export declare class StorageError extends FirebaseError
<b>Extends:</b> FirebaseError
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(code, message, status_) | Constructs a new instance of the <code>StorageError</code> class |
| Property | Modifiers | Type | Description |
|---|---|---|---|
| customData | { serverResponse: string | null; } | Stores custom error data unique to the <code>StorageError</code>. | |
| serverResponse | null | string | Optional response message that was added by the server. | |
| status | number |
| Method | Modifiers | Description |
|---|---|---|
| _codeEquals(code) | Compares a <code>StorageErrorCode</code> against this error's code, filtering out the prefix. |
Constructs a new instance of the StorageError class
<b>Signature:</b>
constructor(code: StorageErrorCode, message: string, status_?: number);
| Parameter | Type | Description |
|---|---|---|
| code | StorageErrorCode | A <code>StorageErrorCode</code> string to be prefixed with 'storage/' and added to the end of the message. |
| message | string | Error message. |
| status_ | number | Corresponding HTTP Status Code |
Stores custom error data unique to the StorageError<!-- -->.
<b>Signature:</b>
customData: {
serverResponse: string | null;
};
Optional response message that was added by the server.
<b>Signature:</b>
get serverResponse(): null | string;
set serverResponse(serverResponse: string | null);
<b>Signature:</b>
get status(): number;
set status(status: number);
Compares a StorageErrorCode against this error's code, filtering out the prefix.
<b>Signature:</b>
_codeEquals(code: StorageErrorCode): boolean;
| Parameter | Type | Description |
|---|---|---|
| code | StorageErrorCode |
<b>Returns:</b>
boolean