mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-26 18:23:27 +01:00
Another alternative error message for when offline
This commit is contained in:
parent
0499010981
commit
da30659f64
@ -133,7 +133,7 @@ func saveHistoryEntry() {
|
||||
lib.CheckFatalError(err)
|
||||
_, err = lib.ApiPost("/api/v1/submit", "application/json", jsonValue)
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "dial tcp: lookup api.hishtory.dev") {
|
||||
if strings.Contains(err.Error(), "dial tcp: lookup api.hishtory.dev") || strings.Contains(err.Error(), "read: connection reset by peer") {
|
||||
// TODO: Somehow handle this and don't completely lose it
|
||||
lib.GetLogger().Printf("Failed to remotely persist hishtory entry because the device is offline!")
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user