File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
rust/cubesql/cubesql/src/sql/postgres Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,14 @@ impl PostgresAuthService for PostgresAuthServiceDefaultImpl {
87
87
)
88
88
. await ;
89
89
90
- let auth_fail = || {
91
- AuthenticationStatus :: Failed ( format ! (
92
- "password authentication failed for user \" {}\" " ,
93
- user
94
- ) )
95
- } ;
96
-
97
- let Ok ( authenticate_response) = authenticate_response else {
98
- return auth_fail ( ) ;
90
+ let authenticate_response = match authenticate_response {
91
+ Ok ( r) => r,
92
+ Err ( err) => {
93
+ return AuthenticationStatus :: Failed ( format ! (
94
+ "password authentication failed for user \" {}\" . \n Error: {}" ,
95
+ user, err. message,
96
+ ) )
97
+ }
99
98
} ;
100
99
101
100
if !authenticate_response. skip_password_check {
@@ -104,7 +103,10 @@ impl PostgresAuthService for PostgresAuthServiceDefaultImpl {
104
103
Some ( password) => password == password_message. password ,
105
104
} ;
106
105
if !is_password_correct {
107
- return auth_fail ( ) ;
106
+ return AuthenticationStatus :: Failed ( format ! (
107
+ "password authentication failed for user \" {}\" " ,
108
+ user
109
+ ) ) ;
108
110
}
109
111
}
110
112
You can’t perform that action at this time.
0 commit comments