title: How to figure which is the right cognito error
body: <p>Lets say I want to create a library application and manage user subscriptions with AWS Cognito. I have the following user registered in my AWS Cognito user pool</p>
  <pre><code> email: abc@abc.abc
   psw: 123456
  </code></pre>
  <p>And I wish to populate different errors such as</p>
  <ul>
  <li>you're not registered - for users who didn't sign up to our library service</li>
  <li>login data is incorrect - if the user is registered but has a typo in username or password</li>
  <li>please renew subscription -if the subscription ended.</li>
  </ul>
  <p><strong>The problem I'm facing</strong> - it seems that AWS cognito returns <code>NotAuthorizedException</code> when the user didn't signup as well as when he did and just had a typo</p>
  <p>Is there a way to distinct between these two use cases?
  according to AWS(<a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListUserAuthEvents.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListUserAuthEvents.html</a>) there are different errors for these scenarios <code>NotAuthorizedException</code>, <code>InvalidParameterException</code>, <code>UserNotFoundException</code> but for some reason I only get one <code>NotAuthorizedException</code></p>
  <p>Can someone advise</p>