mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-02 11:39:24 +01:00
Treat 502 and 503 errors from the LB as network errors so they get silenced and retried
This commit is contained in:
parent
0da8021ab7
commit
7f75f10b3f
@ -972,7 +972,9 @@ func IsOfflineError(err error) bool {
|
||||
return strings.Contains(err.Error(), "dial tcp: lookup api.hishtory.dev") ||
|
||||
strings.Contains(err.Error(), "connect: network is unreachable") ||
|
||||
strings.Contains(err.Error(), "read: connection reset by peer") ||
|
||||
strings.Contains(err.Error(), ": EOF")
|
||||
strings.Contains(err.Error(), ": EOF") ||
|
||||
strings.Contains(err.Error(), ": status_code=502") ||
|
||||
strings.Contains(err.Error(), ": status_code=503")
|
||||
}
|
||||
|
||||
func ReliableDbCreate(db *gorm.DB, entry interface{}) error {
|
||||
|
Loading…
Reference in New Issue
Block a user