catch timeout error
This commit is contained in:
parent
cf247baf77
commit
85d99f7348
@ -1,5 +1,5 @@
|
||||
network-offline = Please check your internet connection.
|
||||
network-timeout = Connection timed out. Please try again on a different network.
|
||||
network-timeout = Connection timed out. Please try again. If you see frequent timeouts, please try a different network connection.
|
||||
network-proxy-auth = Your proxy requires authentication.
|
||||
network-other = A network error occurred.
|
||||
|
||||
|
@ -261,6 +261,8 @@ fn guess_reqwest_error(mut info: String) -> AnkiError {
|
||||
}
|
||||
let kind = if info.contains("unreachable") || info.contains("dns") {
|
||||
NetworkErrorKind::Offline
|
||||
} else if info.contains("timed out") {
|
||||
NetworkErrorKind::Timeout
|
||||
} else {
|
||||
if info.contains("invalid type") {
|
||||
info = format!(
|
||||
|
Loading…
Reference in New Issue
Block a user