Return 400 instead of 502 when VictoriaLogs rejects a query

A malformed LogsQL query is a user error, not a server failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cedricandClaude Opus 5.5 committed 2026-09-28 16:34:00 +02:00
1 parent 328384032b
commit aad0fb7c16
3 files changed
+24 -5

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ func (a *API) exportCSV(w http.ResponseWriter, r *http.Request) {
})
if err != nil {
if cw == nil {
writeErr(w, http.StatusBadGateway, err)
writeErr(w, queryStatus(err), err)
return
}
// Headers are already sent: the file is truncated, log why.