mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-10 07:27:57 +02:00
Treat 502 and 503 errors from the LB as network errors so they get silenced and retried
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user