Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make StreamlitOauthError inherit from Exception #20

Closed
wants to merge 1 commit into from

Conversation

Vidminas
Copy link

The StreamlitOauthError (in https://github.com/dnplus/streamlit-oauth/blob/main/streamlit_oauth/__init__.py#L29) is defined as:

class StreamlitOauthError:
  """
  Exception raised from streamlit-oauth.
  """

If there is a saved state mismatch, on https://github.com/dnplus/streamlit-oauth/blob/main/streamlit_oauth/__init__.py#L98 it is raised with error text as follows: raise StreamlitOauthError(f"STATE {state} DOES NOT MATCH OR OUT OF DATE")

When triggered, this leads to TypeError: StreamlitOauthError() takes no arguments.

To resolve this, StreamlitOauthError should inherit from the built-in Exception class.

@dnplus
Copy link
Owner

dnplus commented Feb 1, 2024

merged with #21

@dnplus dnplus closed this Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants