mirror of
https://github.com/apache/superset.git
synced 2026-04-16 22:55:52 +00:00
feat: error messages for Presto connections (#14172)
* chore: rename connection errors * feat: error messages for Presto connections * Add unit tests * Update docs/src/pages/docs/Miscellaneous/issue_codes.mdx Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com> Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>
This commit is contained in:
@@ -371,17 +371,18 @@ psql: error: could not connect to server: Operation timed out
|
||||
result = PostgresEngineSpec.extract_errors(Exception(msg))
|
||||
assert result == [
|
||||
SupersetError(
|
||||
message='Unable to connect to database "badDB".',
|
||||
error_type=SupersetErrorType.CONNECTION_UNKNOWN_DATABASE_ERROR,
|
||||
message='We were unable to connect to your database named "badDB".'
|
||||
" Please verify your database name and try again.",
|
||||
level=ErrorLevel.ERROR,
|
||||
extra={
|
||||
"engine_name": "PostgreSQL",
|
||||
"issue_codes": [
|
||||
{
|
||||
"code": 10015,
|
||||
"message": "Issue 1015 - Either the database is "
|
||||
"spelled incorrectly or does not exist.",
|
||||
"code": 1015,
|
||||
"message": (
|
||||
"Issue 1015 - Either the database is spelled "
|
||||
"incorrectly or does not exist.",
|
||||
),
|
||||
}
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user