UNPKG

@aws-amplify/core

Version:
1 lines 3.21 kB
{"version":3,"file":"errorHelpers.mjs","sources":["../../../../../src/singleton/Auth/utils/errorHelpers.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createAssertionFunction } from '../../../errors';\nexport var AuthConfigurationErrorCode;\n(function (AuthConfigurationErrorCode) {\n AuthConfigurationErrorCode[\"AuthTokenConfigException\"] = \"AuthTokenConfigException\";\n AuthConfigurationErrorCode[\"AuthUserPoolAndIdentityPoolException\"] = \"AuthUserPoolAndIdentityPoolException\";\n AuthConfigurationErrorCode[\"AuthUserPoolException\"] = \"AuthUserPoolException\";\n AuthConfigurationErrorCode[\"InvalidIdentityPoolIdException\"] = \"InvalidIdentityPoolIdException\";\n AuthConfigurationErrorCode[\"OAuthNotConfigureException\"] = \"OAuthNotConfigureException\";\n})(AuthConfigurationErrorCode || (AuthConfigurationErrorCode = {}));\nconst authConfigurationErrorMap = {\n [AuthConfigurationErrorCode.AuthTokenConfigException]: {\n message: 'Auth Token Provider not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolAndIdentityPoolException]: {\n message: 'Auth UserPool or IdentityPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolException]: {\n message: 'Auth UserPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId.',\n },\n [AuthConfigurationErrorCode.InvalidIdentityPoolIdException]: {\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.',\n },\n [AuthConfigurationErrorCode.OAuthNotConfigureException]: {\n message: 'oauth param not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure with oauth parameter in your app.',\n },\n};\nexport const assert = createAssertionFunction(authConfigurationErrorMap);\n"],"names":[],"mappings":";;;;AAAA;AACA;AAEU,IAAC;AACX,CAAC,UAAU,0BAA0B,EAAE;AACvC,IAAI,0BAA0B,CAAC,0BAA0B,CAAC,GAAG,0BAA0B;AACvF,IAAI,0BAA0B,CAAC,sCAAsC,CAAC,GAAG,sCAAsC;AAC/G,IAAI,0BAA0B,CAAC,uBAAuB,CAAC,GAAG,uBAAuB;AACjF,IAAI,0BAA0B,CAAC,gCAAgC,CAAC,GAAG,gCAAgC;AACnG,IAAI,0BAA0B,CAAC,4BAA4B,CAAC,GAAG,4BAA4B;AAC3F,CAAC,EAAE,0BAA0B,KAAK,0BAA0B,GAAG,EAAE,CAAC,CAAC;AACnE,MAAM,yBAAyB,GAAG;AAClC,IAAI,CAAC,0BAA0B,CAAC,wBAAwB,GAAG;AAC3D,QAAQ,OAAO,EAAE,qCAAqC;AACtD,QAAQ,kBAAkB,EAAE,kDAAkD;AAC9E,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,oCAAoC,GAAG;AACvE,QAAQ,OAAO,EAAE,+CAA+C;AAChE,QAAQ,kBAAkB,EAAE,qFAAqF;AACjH,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,qBAAqB,GAAG;AACxD,QAAQ,OAAO,EAAE,+BAA+B;AAChD,QAAQ,kBAAkB,EAAE,uFAAuF;AACnH,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,8BAA8B,GAAG;AACjE,QAAQ,OAAO,EAAE,oCAAoC;AACrD,QAAQ,kBAAkB,EAAE,0DAA0D;AACtF,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,0BAA0B,GAAG;AAC7D,QAAQ,OAAO,EAAE,6BAA6B;AAC9C,QAAQ,kBAAkB,EAAE,uEAAuE;AACnG,KAAK;AACL,CAAC;AACW,MAAC,MAAM,GAAG,uBAAuB,CAAC,yBAAyB;;;;"}