MCPcopy
hub / github.com/slackapi/node-slack-sdk / requestErrorWithOriginal

Function requestErrorWithOriginal

packages/web-api/src/errors.ts:63–70  ·  view source on GitHub ↗
(original: Error)

Source from the content-addressed store, hash-verified

61 * @param original - original error
62 */
63export function requestErrorWithOriginal(original: Error): WebAPIRequestError {
64 const error = errorWithCode(
65 new Error(`A request error occurred: ${original.message}`),
66 ErrorCode.RequestError,
67 ) as Partial<WebAPIRequestError>;
68 error.original = original;
69 return (error as WebAPIRequestError);
70}
71
72/**
73 * A factory to create WebAPIHTTPError objects

Callers 1

taskMethod · 0.90

Calls 1

errorWithCodeFunction · 0.70

Tested by

no test coverage detected