Loki: Implement error source (#106766)

* Loki: Implement error source

* Add tests
This commit is contained in:
Ivana Huckova
2025-06-16 15:52:35 +02:00
committed by GitHub
parent dbe815ee68
commit 6767adb4a6
5 changed files with 116 additions and 31 deletions
+2 -2
View File
@@ -77,7 +77,7 @@ func parseQueryType(jsonPointerValue *string) (QueryType, error) {
case "range":
return QueryTypeRange, nil
default:
return QueryTypeRange, fmt.Errorf("invalid queryType: %s", jsonValue)
return QueryTypeRange, backend.DownstreamError(fmt.Errorf("invalid queryType: %s", jsonValue))
}
}
}
@@ -97,7 +97,7 @@ func parseDirection(jsonPointerValue *string) (Direction, error) {
case "scan":
return DirectionBackward, nil
default:
return DirectionBackward, fmt.Errorf("invalid queryDirection: %s", jsonValue)
return DirectionBackward, backend.DownstreamError(fmt.Errorf("invalid queryDirection: %s", jsonValue))
}
}
}