MCPcopy
hub / github.com/subquery/subql / errorHandle

Function errorHandle

packages/cli/src/utils/utils.ts:94–100  ·  view source on GitHub ↗
(e: any, msg: string)

Source from the content-addressed store, hash-verified

92}
93
94export function errorHandle(e: any, msg: string): Error {
95 if (axios.isAxiosError(e) && e?.response?.data) {
96 return new Error(`${msg} ${e.response.data.message ?? e.response.data}`);
97 }
98
99 return new Error(`${msg} ${e.message}`);
100}
101
102export function buildProjectKey(org: string, projectName: string): string {
103 return encodeURIComponent(`${org}/${projectName.toLowerCase()}`);

Callers 14

createDeploymentFunction · 0.90
promoteDeploymentFunction · 0.90
deleteDeploymentFunction · 0.90
deploymentStatusFunction · 0.90
projectsInfoFunction · 0.90
updateDeploymentFunction · 0.90
ipfsCID_validateFunction · 0.90
imageVersionsFunction · 0.90
getProjectFunction · 0.90
createProjectFunction · 0.90
deleteProjectFunction · 0.90
fetchTemplatesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected