Skip to content

forgot_password does not catch UserNotFoundException and simply returns Ok response. #1332

@HIppei

Description

@HIppei

Describe the bug

When using forgot_password() and passing not existing username, it does not return UserNotFoundException, but Ok response.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

This must return UserNotFoundException.

Current Behavior

It simply returns Ok response.

Reproduction Steps

Please make simple forgot_password request with not existing username, and you can see Ok response.

use aws_sdk_cognitoidentityprovider::Client;

let client = Client::new('your_config');

let result = client
     .forgot_password()
     .set_client_id('your_client_id')
     .set_username('your_not_existing_username')
     .send()
     .await;

println!("result: {result:?}");

Possible Solution

No response

Additional Information/Context

No response

Version

`aws-sdk-cognitoidentityprovider = "1.91.0"`

Environment details (OS name and version, etc.)

macOS Sequoia 15.5

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions