From da30659f64a8677c4c504fccbcf6527513f9b923 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Thu, 28 Apr 2022 11:01:49 -0700 Subject: [PATCH] Another alternative error message for when offline --- hishtory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hishtory.go b/hishtory.go index 41efe60..4a28c09 100644 --- a/hishtory.go +++ b/hishtory.go @@ -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 {