This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 7ce1a3445c fix: oauth2 trino (#31993)
7ce1a3445c is described below

commit 7ce1a3445c0e548d2099477b602162ee545f4d4f
Author: Dmitry Kochnev <[email protected]>
AuthorDate: Fri Feb 21 02:04:11 2025 +0300

    fix: oauth2 trino (#31993)
---
 superset/db_engine_specs/trino.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/superset/db_engine_specs/trino.py 
b/superset/db_engine_specs/trino.py
index c7ae2b0f82..beb7c0a604 100644
--- a/superset/db_engine_specs/trino.py
+++ b/superset/db_engine_specs/trino.py
@@ -62,9 +62,7 @@ except ImportError:
 class CustomTrinoAuthErrorMeta(type):
     def __instancecheck__(cls, instance: object) -> bool:
         logger.info("is this being called?")
-        return isinstance(
-            instance, HttpError
-        ) and "error 401: b'Invalid credentials'" in str(instance)
+        return isinstance(instance, HttpError) and "error 401" in str(instance)
 
 
 class TrinoAuthError(HttpError, metaclass=CustomTrinoAuthErrorMeta):

Reply via email to