Skip to content

Bug in token refresh logic makes library practically unusable #2

Description

@joxl

There is a bug in the token refresh logic that results in permanent silent failure. This makes the entire ebapi library pointless to use because authorization tokens require frequent refreshes.

Calling the refresh() method on a FileTokens instances (used by ApiConnection) results in a NameError, but is masked by a try/except block that ignores any instance of Exception that it catches.

Comment added in code snippet below (copied from tokens.py here) identifies where the bug is located:

# snip
try:
    self.user.loc[idx] = refresh_token(ref)  # <-- refresh_token() is not defined (NameError)
except Exception:
    pass  # <-- bug is completely silenced
# snip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions