Skip to content

Commit

Permalink
comment out problematic code in _verify_jwt_token
Browse files Browse the repository at this point in the history
  • Loading branch information
parkererickson-tg committed Oct 10, 2024
1 parent 0736ea6 commit 4ec7f0a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pyTigerGraph/pyTigerGraphBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _verify_jwt_token_support(self):
logger.debug(f"Using auth header: {self.authHeader}")
version = self.getVer()
logger.info(f"Database version: {version}")

'''
# Check JWT support for GSQL server
if self._versionGreaterThan4_0():
logger.debug(f"Attempting to get auth info with URL: {self.gsUrl + '/gsql/v1/tokens/check'}")
Expand All @@ -228,13 +228,14 @@ def _verify_jwt_token_support(self):
else:
logger.debug(f"Attempting to get auth info with URL: {self.gsUrl + '/gsqlserver/gsql/simpleauth'}")
self._get(f"{self.gsUrl}/gsqlserver/gsql/simpleauth", authMode="token", resKey=None)
'''
except requests.exceptions.ConnectionError as e:
logger.error(f"Connection error: {e}.")
raise RuntimeError(f"Connection error: {e}.") from e
raise TigerGraphException(f"Connection error: "+str(e))
except Exception as e:
message = "The JWT token might be invalid or expired or DB version doesn't support JWT token. Please generate new JWT token or switch to API token or username/password."
message = "The JWT token might be invalid or expired or DB version doesn't support JWT token. Please generate new JWT token or switch to API token or username/password. Error: "+str(e)
logger.error(f"Error occurred: {e}. {message}")
raise RuntimeError(message) from e
raise TigerGraphException(message)

def _locals(self, _locals: dict) -> str:
del _locals["self"]
Expand Down

0 comments on commit 4ec7f0a

Please sign in to comment.