Ignore GetLogPage error message

This commit is contained in:
Ben Zhang 2024-11-27 23:42:49 -08:00
parent bd02064d99
commit fdfec20273

View file

@ -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
}