File tree Expand file tree Collapse file tree 2 files changed +5
-18
lines changed
wp_rs_cli/src/bin/wp_rs_cli Expand file tree Collapse file tree 2 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -187,35 +187,22 @@ impl From<reqwest::Error> for RequestExecutionError {
187
187
188
188
if let Some ( io_error) = error. as_io_error ( ) {
189
189
match io_error. kind ( ) {
190
- std:: io:: ErrorKind :: ConnectionRefused => {
191
- return RequestExecutionError :: RequestExecutionFailed {
192
- status_code,
193
- redirects : None ,
194
- reason : RequestExecutionErrorReason :: NonExistentSiteError {
195
- error_message : Some ( "Connection refused" . to_string ( ) ) ,
196
- suggested_action : None ,
197
- } ,
198
- } ;
199
- }
200
190
std:: io:: ErrorKind :: UnexpectedEof => {
201
191
// Server terminated the connection unexpectedly
202
192
return RequestExecutionError :: RequestExecutionFailed {
203
193
status_code,
204
194
redirects : None ,
205
- reason : RequestExecutionErrorReason :: NonExistentSiteError {
206
- error_message : Some (
207
- "The server terminated the connection unexpectedly" . to_string ( ) ,
208
- ) ,
209
- suggested_action : None ,
195
+ reason : RequestExecutionErrorReason :: HttpError {
196
+ reason : "The server terminated the connection unexpectedly" . to_string ( ) ,
210
197
} ,
211
198
} ;
212
199
}
213
200
_ => {
214
201
return RequestExecutionError :: RequestExecutionFailed {
215
202
status_code,
216
203
redirects : None ,
217
- reason : RequestExecutionErrorReason :: GenericError {
218
- error_message : error . to_string ( ) ,
204
+ reason : RequestExecutionErrorReason :: HttpError {
205
+ reason : io_error . to_string ( ) ,
219
206
} ,
220
207
} ;
221
208
}
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ impl SimplifiedDiscoveryResult {
182
182
println ! ( "{}" , format!( "Login URL found: {login_url}" ) . green( ) ) ;
183
183
}
184
184
Err ( error) => {
185
- println ! ( "{}" , format! ( "Error: {}" , error) . red( ) ) ;
185
+ println ! ( "{}" , error. to_string ( ) . red( ) ) ;
186
186
}
187
187
}
188
188
}
You can’t perform that action at this time.
0 commit comments