UNPKG

@aws-amplify/core

Version:
1 lines 1.29 kB
{"version":3,"file":"errorHelpers.mjs","sources":["../../../src/errors/errorHelpers.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyErrorCode } from '../types';\nimport { createAssertionFunction } from './createAssertionFunction';\nconst amplifyErrorMap = {\n [AmplifyErrorCode.NoEndpointId]: {\n message: 'Endpoint ID was not found and was unable to be created.',\n },\n [AmplifyErrorCode.PlatformNotSupported]: {\n message: 'Function not supported on current platform.',\n },\n [AmplifyErrorCode.Unknown]: {\n message: 'An unknown error occurred.',\n },\n [AmplifyErrorCode.NetworkError]: {\n message: 'A network error has occurred.',\n },\n};\nexport const assert = createAssertionFunction(amplifyErrorMap);\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA,MAAM,eAAe,GAAG;AACxB,IAAI,CAAC,gBAAgB,CAAC,YAAY,GAAG;AACrC,QAAQ,OAAO,EAAE,yDAAyD;AAC1E,KAAK;AACL,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,GAAG;AAC7C,QAAQ,OAAO,EAAE,6CAA6C;AAC9D,KAAK;AACL,IAAI,CAAC,gBAAgB,CAAC,OAAO,GAAG;AAChC,QAAQ,OAAO,EAAE,4BAA4B;AAC7C,KAAK;AACL,IAAI,CAAC,gBAAgB,CAAC,YAAY,GAAG;AACrC,QAAQ,OAAO,EAAE,+BAA+B;AAChD,KAAK;AACL,CAAC,CAAC;AACU,MAAC,MAAM,GAAG,uBAAuB,CAAC,eAAe;;;;"}