1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.asSdkError = void 0;
|
4 | const 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 | };
|
13 | exports.asSdkError = asSdkError;
|