Skip to content

Commit 07d9305

Browse files
committed
Update error message when using disabled PromQL experimental aggregation function
Signed-off-by: Jeanette Tan <[email protected]>
1 parent aa96f2e commit 07d9305

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

promql/parser/parse.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ func (p *parser) newAggregateExpr(op Item, modifier, args Node) (ret *AggregateE
450450
if !EnableExperimentalFunctions && ret.Op.IsExperimentalAggregator() {
451451
// In mimir we return a custom message which doesn't mention the CLI flag that should be used to enable
452452
// experimental functions, given it's different (and in SaaS customers don't even have access to it).
453-
p.addParseErrf(ret.PositionRange(), "limitk() and limit_ratio() functions are not enabled")
453+
p.addParseErrf(ret.PositionRange(), `function "%s" is not enabled`, ret.Op)
454454
return
455455
}
456456
desiredArgs = 2

0 commit comments

Comments
 (0)