mirror of
https://github.com/apache/superset.git
synced 2026-05-09 01:46:06 +00:00
Addressing PR feedback
This commit is contained in:
@@ -590,7 +590,9 @@ class BaseEngineSpec: # pylint: disable=too-many-public-methods
|
||||
# Driver-specific params to be included in the `get_oauth2_token` request body
|
||||
oauth2_additional_token_request_params: dict[str, Any] = {}
|
||||
# Driver-specific exception that should be mapped to OAuth2RedirectError
|
||||
oauth2_exception = OAuth2RedirectError
|
||||
oauth2_exception: type[Exception] | tuple[type[Exception], ...] = (
|
||||
OAuth2RedirectError
|
||||
)
|
||||
|
||||
# Does the query id related to the connection?
|
||||
# The default value is True, which means that the query id is determined when
|
||||
|
||||
@@ -41,7 +41,7 @@ from superset.databases.schemas import encrypted_field_properties, EncryptedStri
|
||||
from superset.db_engine_specs.base import DatabaseCategory
|
||||
from superset.db_engine_specs.shillelagh import ShillelaghEngineSpec
|
||||
from superset.errors import ErrorLevel, SupersetError, SupersetErrorType
|
||||
from superset.exceptions import SupersetException
|
||||
from superset.exceptions import OAuth2TokenRefreshError, SupersetException
|
||||
from superset.utils import json
|
||||
from superset.utils.oauth2 import get_oauth2_access_token
|
||||
|
||||
@@ -152,7 +152,7 @@ class GSheetsEngineSpec(ShillelaghEngineSpec):
|
||||
"https://accounts.google.com/o/oauth2/v2/auth"
|
||||
)
|
||||
oauth2_token_request_uri = "https://oauth2.googleapis.com/token" # noqa: S105
|
||||
oauth2_exception = UnauthenticatedError
|
||||
oauth2_exception = (UnauthenticatedError, OAuth2TokenRefreshError)
|
||||
|
||||
@classmethod
|
||||
def get_oauth2_authorization_uri(
|
||||
|
||||
Reference in New Issue
Block a user