Fix/issue 58 auth tokens expire silently#17
Merged
Conversation
Cookie tokens for paywall site extraction could expire without any warning: - load_editthiscookie_json() silently filtered expired cookies with no log, returning empty lists when all cookies expired - extract_authenticated() returned None when contexts failed, causing track_attempt to crash with AttributeError - The crash was caught by a bare except and logged at DEBUG level, making it invisible in production Now expired cookies are counted and warned about, auth failures return proper ExtractedContent with error messages, track_attempt handles None defensively, and auth exceptions are logged at WARNING level. Resolves #58
Owner
Author
Confidence: 58/100Fix addresses silent cookie expiration with logging and error returns, but lacks tests and includes an unrelated new search-and-summarize endpoint without test coverage. If reviewing:
Reviewed by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brief description of what this PR does and why.
Type of change
Changes
Testing
uv run pytest tests/ -v --tb=shortpasses locallyChecklist
Breaking change?
If this is a breaking change, describe the impact and the migration path here.