You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AWS SDK, in addition to CognitoIdentityProviderException seems to also throw GuzzleHttp\Exception\ClientException.
public function registerUser() for example throws this for {"__type":"UsernameExistsException","message":"User already exists"}
(See error snippet below).
This doesn't get caught and mapped to the pmill\AwsCognito\Exception's.
Making the error handling significantly harder for the caller method.
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://cognito-idp.us-east-1.amazonaws.com` resulted in a `400 Bad Request` response: {"__type":"UsernameExistsException","message":"User already exists"} in /app/public/.../vendor/pmill/aws-cognito/src/Exception/CognitoResponseException.php on line 28
The text was updated successfully, but these errors were encountered:
Facing the same issue, I cant catch the exception.
CognitoClient Class need to return the issue instead of throwing an exception : throw CognitoResponseException::createFromCognitoException($e);
The AWS SDK, in addition to
CognitoIdentityProviderException
seems to also throwGuzzleHttp\Exception\ClientException
.public function registerUser()
for example throws this for{"__type":"UsernameExistsException","message":"User already exists"}
(See error snippet below).
This doesn't get caught and mapped to the pmill\AwsCognito\Exception's.
Making the error handling significantly harder for the caller method.
(Related #20?)
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://cognito-idp.us-east-1.amazonaws.com` resulted in a `400 Bad Request` response: {"__type":"UsernameExistsException","message":"User already exists"} in /app/public/.../vendor/pmill/aws-cognito/src/Exception/CognitoResponseException.php on line 28
The text was updated successfully, but these errors were encountered: