File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -131,8 +131,8 @@ pub enum InvalidLogin {
131131 NoTarget ,
132132 // Login has an illegal origin field, split off from IllegalFieldValue since this is a known
133133 // issue with the Desktop logins and we don't want to report it to Sentry (see #5233).
134- #[ error( "Login has illegal origin" ) ]
135- IllegalOrigin ,
134+ #[ error( "Login has illegal origin: {reason} " ) ]
135+ IllegalOrigin { reason : String } ,
136136 #[ error( "Login has illegal field: {field_info}" ) ]
137137 IllegalFieldValue { field_info : String } ,
138138}
Original file line number Diff line number Diff line change @@ -435,7 +435,10 @@ impl LoginEntry {
435435 error_support:: redact_url( origin)
436436 ) ;
437437 // We can't fixup completely invalid records, so always throw.
438- Err ( InvalidLogin :: IllegalOrigin . into ( ) )
438+ Err ( InvalidLogin :: IllegalOrigin {
439+ reason : e. to_string ( ) ,
440+ }
441+ . into ( ) )
439442 }
440443 }
441444 }
@@ -1129,7 +1132,8 @@ mod tests {
11291132 TestCase {
11301133 login : login_with_malformed_origin_parens,
11311134 should_err : true ,
1132- expected_err : "Invalid login: Login has illegal origin" ,
1135+ expected_err :
1136+ "Invalid login: Login has illegal origin: relative URL without a base" ,
11331137 } ,
11341138 TestCase {
11351139 login : login_with_host_unicode,
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ impl LoginsSyncEngine {
144144 match e {
145145 // This is a known error with Desktop logins (see #5233), just log it
146146 // rather than reporting to sentry
147- Error :: InvalidLogin ( InvalidLogin :: IllegalOrigin ) => {
147+ Error :: InvalidLogin ( InvalidLogin :: IllegalOrigin { reason : _ } ) => {
148148 warn ! ( "logins-deserialize-error: {e}" ) ;
149149 }
150150 // For all other errors, report them to Sentry
You can’t perform that action at this time.
0 commit comments