SSE: Return error messages instead of 500 on SSE command parse errors (#109480)

fixes #108897

---------

Co-authored-by: Kyle Brandt <kyle@grafana.com>
This commit is contained in:
Ihor Yeromin
2025-09-02 18:00:14 +00:00
committed by GitHub
co-authored by Kyle Brandt
parent 76af73b3f3
commit bdf9583ada
4 changed files with 40 additions and 2 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ func buildCMDNode(ctx context.Context, rn *rawNode, toggles featuremgmt.FeatureT
return nil, fmt.Errorf("expression command type '%v' in expression '%v' not implemented", commandType, rn.RefID)
}
if err != nil {
return nil, fmt.Errorf("failed to parse expression '%v': %w", rn.RefID, err)
return nil, MakeParseError(rn.RefID, err)
}
return node, nil