MCPcopy Index your code
hub / github.com/cloudconvert/cloudconvert-cli / getApiError

Function getApiError

src/app.ts:157–168  ·  view source on GitHub ↗
(error: Error)

Source from the content-addressed store, hash-verified

155}
156
157function getApiError(error: Error): { message?: string; code?: string } | undefined {
158 const maybeResponse = error as Error & {
159 response?: {
160 data?: {
161 message?: string;
162 code?: string;
163 };
164 };
165 };
166
167 return maybeResponse.response?.data;
168}

Callers 1

createCliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected