SQL Expressions: Include SQL Parser/Syntax error in the public message (#100725)

fixes #100721
This commit is contained in:
Kyle Brandt authored and GitHub committed 2025-02-14 09:09:21 -05:00
1 parent 196a73ec72
commit c291ec7ba9
2 files changed
+18 -1

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ func NewSQLCommand(refID, rawSQL string) (*SQLCommand, error) {
if err != nil {
logger.Warn("invalid sql query", "sql", rawSQL, "error", err)
return nil, errutil.BadRequest("sql-invalid-sql",
errutil.WithPublicMessage("error reading SQL command"),
errutil.WithPublicMessage(fmt.Sprintf("invalid SQL query: %s", err)),
)
}
if len(tables) == 0 {