@camunda8/sdk
Version:
[](https://www.npmjs.com/package/@camunda8/sdk)
37 lines (36 loc) • 1.56 kB
TypeScript
import * as Got from 'got';
import { BeforeErrorHook } from 'got';
import { CamundaRestError } from '../c8/lib/C8Dto';
import { CamundaPlatform8Configuration } from './Configuration';
export declare class HTTPError extends Got.HTTPError implements CamundaRestError {
statusCode: number;
title: string;
detail: string;
instance: string;
type: "about:blank";
status: number;
originalMessage: string;
method: string | undefined;
url: string | undefined;
constructor({ response, method, url, message, }: {
response: Got.Response<unknown>;
method?: string;
url?: string;
message: string;
});
/**
* Provides a rich string representation including method, URL, and response
* detail for debugging (e.g. console.log, uncaught exception traces) while
* keeping error.message static for error-monitoring grouping (Sentry, etc.).
* See: https://github.com/camunda/camunda-8-js-sdk/issues/658
*/
toString(): string;
}
export type RestError = HTTPError | Got.RequestError | Got.ReadError | Got.ParseError | Got.TimeoutError | Got.CancelError | Got.CacheError | Got.MaxRedirectsError | Got.UnsupportedProtocolError; /**
* This function adds the call point to the error stack trace of got errors.
* This enables users to see where the error originated from.
*
* It also logs the error to the Camunda Support log.
* This is useful for debugging and support purposes.
*/
export declare const gotBeforeErrorHook: (config: CamundaPlatform8Configuration) => BeforeErrorHook;