mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 22:22:25 +08:00
SQL Expressions: Include SQL Parser/Syntax error in the public message (#100725)
fixes #100721
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user