From fdfec20273f69d87412b03be066e8f041c0c2beb Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Wed, 27 Nov 2024 23:42:49 -0800 Subject: [PATCH] Ignore GetLogPage error message --- readjson.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/readjson.go b/readjson.go index e163dcb..0658c3a 100644 --- a/readjson.go +++ b/readjson.go @@ -154,6 +154,12 @@ func jsonIsOk(logger *slog.Logger, json gjson.Result) bool { if messages.Exists() { for _, message := range messages.Array() { if message.Get("severity").String() == "error" { + // if the string contains "GetLogPage failed", then ignore it + // this is a known issue with Apple internal SSDs + if strings.Contains(message.Get("string").String(), "GetLogPage failed") { + logger.Warn("Ignoring GetLogPage failed error", "device", json.Get("device.name").String(), "message", message.Get("string").String()) + continue + } logger.Error(message.Get("string").String()) return false }