SQL Expressions: Fix error handling (#102650)

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

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())
}