Skip to content

Commit

Permalink
refactor(deriv_auth): improve reset password error handling (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
sahani-deriv authored Jan 26, 2024
1 parent 3f3f1c0 commit cc2d2eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class DerivResetPassCubit extends Cubit<DerivResetPassState>
/// Check if password is reset
if (isPasswordReset) {
emit(const DerivResetPassPasswordChangedState());
} else {
emit(const DerivResetPassErrorState());
}
} on Exception catch (e) {
emit(DerivResetPassErrorState(errorMessage: e.toString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DerivResetPassPasswordChangedState extends DerivResetPassState {
class DerivResetPassErrorState extends DerivResetPassState {
/// Initializes Reset pass error State.
const DerivResetPassErrorState({
required this.errorMessage,
this.errorMessage,
});

/// Error message.
Expand Down

0 comments on commit cc2d2eb

Please sign in to comment.