@aws-amplify/core
Version:
Core category of aws-amplify
1 lines • 1.5 kB
Source Map (JSON)
{"version":3,"file":"AmplifyError.mjs","sources":["../../../src/errors/AmplifyError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport class AmplifyError extends Error {\n /**\n * Constructs an AmplifyError.\n *\n * @param message text that describes the main problem.\n * @param underlyingError the underlying cause of the error.\n * @param recoverySuggestion suggestion to recover from the error.\n *\n */\n constructor({ message, name, recoverySuggestion, underlyingError, }) {\n super(message);\n this.name = name;\n this.underlyingError = underlyingError;\n this.recoverySuggestion = recoverySuggestion;\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AmplifyError;\n Object.setPrototypeOf(this, AmplifyError.prototype);\n }\n}\n"],"names":[],"mappings":"AAAA;AACA;AACO,MAAM,YAAY,SAAS,KAAK,CAAC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,eAAe,GAAG,EAAE;AACzE,QAAQ,KAAK,CAAC,OAAO,CAAC;AACtB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,eAAe,GAAG,eAAe;AAC9C,QAAQ,IAAI,CAAC,kBAAkB,GAAG,kBAAkB;AACpD;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,YAAY;AACvC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC;AAC3D;AACA;;;;"}