0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Amazon Cognito Identity Providerのエラーレスポンス

Last updated at Posted at 2020-04-03

Amazon Cognito Identity Providerでは異なるエラー内容でも同じエラーコードが発行されるものがある。
エラー内容ごとにエラーハンドリングを行う必要がある場合は、エラーメッセージを確認することで区別が可能である。
ここでは一部の実際に確認したものを掲載する。

AliasExistsException

  • {'Message': 'Already found an entry for the provided username.', 'Code': 'AliasExistsException'}

CodeMismatchException

  • {'Message': 'Invalid session provided', 'Code': 'CodeMismatchException'}

ExpiredCodeException

  • {'Message': 'Invalid code provided, please request a code again.', 'Code': 'ExpiredCodeException'}

GroupExistsException

  • {'Message': 'A group with the name already exists.', 'Code': 'GroupExistsException'}

InvalidParameterException

  • {'Message': 'Attributes did not conform to the schema: {attributes}: Attribute does not exist in the schema.\n', 'Code': 'InvalidParameterException'}
  • {'Message': 'Invalid email address format.', 'Code': 'InvalidParameterException'}
  • {'Message': "1 validation error detected: Value 'string' at 'userPoolId' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\w-]+_[0-9a-zA-Z]+", 'Code': 'InvalidParameterException'}

InvalidPasswordException

  • {'Message': 'Password did not conform with password policy: Password not long enough', 'Code': 'InvalidPasswordException'}
  • {'Message': 'Password did not conform with password policy: Password must have uppercase characters', 'Code': 'InvalidPasswordException'}
  • {'Message': 'Password did not conform with password policy: Password must have numeric characters', 'Code': 'InvalidPasswordException'}
  • {'Message': 'Password did not conform with password policy: Password must have lowercase characters', 'Code': 'InvalidPasswordException'}

LimitExceededException

  • {'Attempt limit exceeded, please try after some time.', 'Code': LimitExceededException'}

NotAuthorizedException

  • {'Message': 'Incorrect username or password.', 'Code': 'NotAuthorizedException'}
  • {'Message': 'Invalid Access Token', 'Code': 'NotAuthorizedException'}
  • {'Message': 'Invalid Refresh Token', 'Code': 'NotAuthorizedException'}

ResourceNotFoundException

  • {'Message': 'Group not found.', 'Code': 'ResourceNotFoundException'}

UsernameExistsException

  • {'Message': 'User account already exists', 'Code': 'UsernameExistsException'}
  • {'Message': 'An account with the email already exists.', 'Code': 'UsernameExistsException'}

UserNotFoundException

  • {'Message': 'User does not exist.', 'Code': 'UserNotFoundException'}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?