mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
feat: Better Errors in SQL Lab (#15432)
* snowflake errors * added big query * added to setup error messages, first test * all big query testing added * added snowflake test * added syntax error * added syntax errors to most used databases
This commit is contained in:
@@ -85,6 +85,8 @@ COLUMN_DOES_NOT_EXIST_REGEX = re.compile(
|
||||
r"does not exist\s+LINE (?P<location>\d+?)"
|
||||
)
|
||||
|
||||
SYNTAX_ERROR_REGEX = re.compile('syntax error at or near "(?P<syntax_error>.*?)"')
|
||||
|
||||
|
||||
class PostgresBaseEngineSpec(BaseEngineSpec):
|
||||
""" Abstract class for Postgres 'like' databases """
|
||||
@@ -151,6 +153,14 @@ class PostgresBaseEngineSpec(BaseEngineSpec):
|
||||
SupersetErrorType.COLUMN_DOES_NOT_EXIST_ERROR,
|
||||
{},
|
||||
),
|
||||
SYNTAX_ERROR_REGEX: (
|
||||
__(
|
||||
"Please check your query for syntax errors at or "
|
||||
'near "%(syntax_error)s". Then, try running your query again.'
|
||||
),
|
||||
SupersetErrorType.SYNTAX_ERROR,
|
||||
{},
|
||||
),
|
||||
}
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user