Skip to content

Commit

Permalink
log as error
Browse files Browse the repository at this point in the history
  • Loading branch information
nheeb committed Sep 2, 2024
1 parent 96553f6 commit 42aefd9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/hermes/commands/deposit/invenio.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,18 @@ def __init__(self, command: HermesDepositCommand, ctx: CodeMetaContext, client=N
self.invenio_ctx = None
self.config = getattr(self.command.settings, self.platform_name)

_log.error(f"Token Secret: {self.config.auth_token}")
_log.error(f"Client is none: {str(client is None)}")

if client is None:
auth_token = self.config.auth_token

# If auth_token is a refresh-token, get the auth-token from that.
if str(auth_token).startswith("REFRESH_TOKEN:"):
_log.debug(f"Getting token from refresh_token {auth_token}")
_log.error(f"Getting token from refresh_token {auth_token}")
get_token_from_refresh_token(auth_token.split("REFRESH_TOKEN:")[1])
_log.debug(f"Token: {os.environ.get('ZENODO_TOKEN')}")
_log.debug(f"Refresh Token: {os.environ.get('ZENODO_TOKEN_REFRESH')}")
_log.error(f"Token: {os.environ.get('ZENODO_TOKEN')}")
_log.error(f"Refresh Token: {os.environ.get('ZENODO_TOKEN_REFRESH')}")
auth_token = os.environ.get('ZENODO_TOKEN')
if not auth_token:
raise DepositionUnauthorizedError("No valid auth token given for deposition platform")
Expand Down

0 comments on commit 42aefd9

Please sign in to comment.