{"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,CAAC;AACvB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB,QAAQ,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;AAC/C,QAAQ,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACrD;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC;AACxC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AAC5D,KAAK;AACL;;;;"}