Content-Length: 273584 | pFad | http://github.com/langfuse/langfuse-python/pull/1224

35 fix(client): auth check on missing credentials by hassiebp · Pull Request #1224 · langfuse/langfuse-python · GitHub
Skip to content

fix(client): auth check on missing credentials #1224

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

Merged
merged 3 commits into from
Jun 26, 2025
Merged

Conversation

hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Jun 24, 2025

Important

Handle AttributeError in auth_check() in client.py by logging a warning and returning False if the client is not properly initialized.

  • Behavior:
    • In auth_check() in client.py, handle AttributeError by logging a warning and returning False if the client is not properly initialized.
  • Logging:
    • Add warning log for AttributeError in auth_check() to indicate improper client initialization.

This description was created by Ellipsis for f8bf543. You can customize this summary. It will automatically update as commits are pushed.

Greptile Summary

Disclaimer: Experimental PR review

Enhanced error handling in auth_check() method to prevent crashes when credentials are missing or invalid, improving client initialization robustness.

  • Added AttributeError handling in langfuse/_client/client.py to gracefully handle cases where self.api is not accessible
  • Returns False and logs warning when authentication fails due to missing credentials
  • Maintains compatibility with existing auth_check() boolean return contract

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp enabled auto-merge (squash) June 26, 2025 11:48
@hassiebp hassiebp merged commit 875d2f2 into main Jun 26, 2025
10 checks passed
@hassiebp hassiebp deleted the hassieb/lfe-5468 branch June 26, 2025 17:23
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.

bug: AttributeError: 'Langfuse' object has no attribute 'api' when calling auth_check when there is no auth.
1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/langfuse/langfuse-python/pull/1224

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy