MCPcopy Create free account
hub / github.com/firebase/firebase-tools / handleErrorResponse

Function handleErrorResponse

src/database/metadata.ts:10–19  ·  view source on GitHub ↗
(response: any)

Source from the content-addressed store, hash-verified

8import * as utils from "../utils";
9
10function handleErrorResponse(response: any): Promise<any> {
11 if (response.body && response.body.error) {
12 return utils.reject(response.body.error, { code: 2 });
13 }
14
15 logger.debug("[rules] error:", response.status, response.body);
16 return utils.reject("Unexpected error encountered with database.", {
17 code: 2,
18 });
19}
20
21export type RulesetSource = string;
22export type RulesetId = string;

Callers 5

listAllRulesetsFunction · 0.85
getRulesetFunction · 0.85
getRulesetLabelsFunction · 0.85
createRulesetFunction · 0.85
setRulesetLabelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…