SQL Expressions: Fix error handling (#102650)

This commit is contained in:
Todd Treece authored and GitHub committed 2025-03-21 18:47:00 -04:00
1 parent 8becf33d31
commit 1b1f626edd
2 files changed
+21 -6

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ var logger = log.New("sql_expr")
func TablesList(rawSQL string) ([]string, error) {
stmt, err := sqlparser.Parse(rawSQL)
if err != nil {
logger.Error("error parsing sql: %s", err.Error(), "sql", rawSQL)
logger.Error("error parsing sql", "error", err.Error(), "sql", rawSQL)
return nil, fmt.Errorf("error parsing sql: %s", err.Error())
}