@forge/kvs
1.5.1-next.01.6.0-next.1
out/utils/error-handling.d.ts~
out/utils/error-handling.d.tsModified+7−2
Index: package/out/utils/error-handling.d.ts
===================================================================
--- package/out/utils/error-handling.d.ts
+++ package/out/utils/error-handling.d.ts
@@ -1,7 +1,12 @@
import { APIResponse } from '@forge/api';
-import { ForgeError } from '../errors';
+import { APIErrorResponseDetails, ForgeError } from '../errors';
+export interface RequestContext {
+ httpMethod: string;
+ httpPath: string;
+}
export declare function isForgeError(body: unknown): body is ForgeError;
export declare function safeGetParsedBody(text: string): unknown | undefined;
+export declare function getAPIErrorResponseDetails(response: APIResponse, responseText: string, requestContext?: RequestContext): APIErrorResponseDetails;
export declare function extractTraceId(response: APIResponse): string | null;
-export declare function checkResponseError(response: APIResponse): Promise<void>;
+export declare function checkResponseError(response: APIResponse, requestContext?: RequestContext): Promise<void>;
//# sourceMappingURL=error-handling.d.ts.map
\ No newline at end of file