mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
feat(bigquery): Custom message when Service Account doesnt have the correct Roles and Permissions (#21838)
This commit is contained in:
committed by
GitHub
parent
059e53a39f
commit
203b289021
@@ -246,11 +246,11 @@ class TestBigQueryDbEngineSpec(TestDbEngineSpec):
|
||||
)
|
||||
|
||||
def test_extract_errors(self):
|
||||
msg = "403 POST https://bigquery.googleapis.com/bigquery/v2/projects/test-keel-310804/jobs?prettyPrint=false: Access Denied: Project User does not have bigquery.jobs.create permission in project profound-keel-310804"
|
||||
msg = "403 POST https://bigquery.googleapis.com/bigquery/v2/projects/test-keel-310804/jobs?prettyPrint=false: Access Denied: Project profound-keel-310804: User does not have bigquery.jobs.create permission in project profound-keel-310804"
|
||||
result = BigQueryEngineSpec.extract_errors(Exception(msg))
|
||||
assert result == [
|
||||
SupersetError(
|
||||
message="We were unable to connect to your database. Please confirm that your service account has the Viewer and Job User roles on the project.",
|
||||
message='Unable to connect. Verify that the following roles are set on the service account: "BigQuery Data Viewer", "BigQuery Metadata Viewer", "BigQuery Job User" and the following permissions are set "bigquery.readsessions.create", "bigquery.readsessions.getData"',
|
||||
error_type=SupersetErrorType.CONNECTION_DATABASE_PERMISSIONS_ERROR,
|
||||
level=ErrorLevel.ERROR,
|
||||
extra={
|
||||
|
||||
Reference in New Issue
Block a user