mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-16 09:00:42 +08:00
🎨 Format HTTP error msg
This commit is contained in:
parent
aa3dcba114
commit
2260ce8d4e
@ -519,7 +519,7 @@ func formatErrorMsg(err error) string {
|
||||
msg = Conf.Language(24)
|
||||
} else if strings.Contains(msgLowerCase, "net/http: request canceled while waiting for connection") || strings.Contains(msgLowerCase, "exceeded while awaiting") || strings.Contains(msgLowerCase, "context deadline exceeded") || strings.Contains(msgLowerCase, "timeout") || strings.Contains(msgLowerCase, "context cancellation while reading body") {
|
||||
msg = Conf.Language(24)
|
||||
} else if strings.Contains(msgLowerCase, "connection was") || strings.Contains(msgLowerCase, "reset by peer") || strings.Contains(msgLowerCase, "refused") || strings.Contains(msgLowerCase, "socket") {
|
||||
} else if strings.Contains(msgLowerCase, "connection was") || strings.Contains(msgLowerCase, "reset by peer") || strings.Contains(msgLowerCase, "refused") || strings.Contains(msgLowerCase, "socket") || strings.Contains(msgLowerCase, "closed idle connection") || strings.Contains(msgLowerCase, "eof") {
|
||||
msg = Conf.Language(28)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user