Jump to top

HttpsErrorCode

interface

The HttpsErrorCode interface provides access to all FunctionsErrorCode type aliases.

Example
try {
 await firebase.functions().httpsCallable('order')();
} catch (httpsError) {
 switch(httpsError.code) {
   case firebase.functions.HttpsErrorCode.NOT_FOUND:
     console.error('Functions endpoint not found');
     break;
   case firebase.functions.HttpsErrorCode.CANCELLED:
     console.error('The operation was cancelled');
     break;
   default:
     console.error('An error occurred');
     break;
 }
}

Properties

ABORTED

</>
ABORTED: "aborted";

ALREADY_EXISTS

</>
ALREADY_EXISTS: "already-exists";

CANCELLED

</>
CANCELLED: "cancelled";

DATA_LOSS

</>
DATA_LOSS: "data-loss";

DEADLINE_EXCEEDED

</>
DEADLINE_EXCEEDED: "deadline-exceeded";

FAILED_PRECONDITION

</>
FAILED_PRECONDITION: "failed-precondition";

INTERNAL

</>
INTERNAL: "internal";

INVALID_ARGUMENT

</>
INVALID_ARGUMENT: "invalid-argument";

NOT_FOUND

</>
NOT_FOUND: "not-found";

OK

</>
OK: "ok";

OUT_OF_RANGE

</>
OUT_OF_RANGE: "out-of-range";

PERMISSION_DENIED

</>
PERMISSION_DENIED: "permission-denied";

RESOURCE_EXHAUSTED

</>
RESOURCE_EXHAUSTED: "resource-exhausted";

UNAUTHENTICATED

</>
UNAUTHENTICATED: "unauthenticated";

UNAVAILABLE

</>
UNAVAILABLE: "unavailable";

UNIMPLEMENTED

</>
UNIMPLEMENTED: "unimplemented";

UNKNOWN

</>
UNKNOWN: "unknown";