UNPKG

439 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.asSdkError = void 0;
4const asSdkError = (error) => {
5 if (error instanceof Error)
6 return error;
7 if (error instanceof Object)
8 return Object.assign(new Error(), error);
9 if (typeof error === "string")
10 return new Error(error);
11 return new Error(`AWS SDK error wrapper for ${error}`);
12};
13exports.asSdkError = asSdkError;