Repository navigation
Clearer error message for a corrupt config or refresh token file (#268) - #974
Open
omaraldulimay wants to merge 2 commits into
Open
omaraldulimay wants to merge 2 commits into
omaraldulimay wants to merge 2 commits into
Conversation
…pen-EO#268) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
soxofaan
reviewed
Nov 17, 2026
soxofaan
left a comment
Member
There was a problem hiding this comment.
This change is too aggressive: the original file will be fully wiped. While it might be corrupt, it might still be recoverable (e.g. user could want to manually fix it). The proposed change makes recovery impossible.
As originally proposed in #268 I would just improve the error message
…n-EO#268) Instead of ignoring or overwriting a corrupt refresh token file, keep the file untouched and raise a clearer error that names the file and suggests fixing or removing it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: omaraldulimay <120497558+omaraldulimay@users.noreply.github.com>
Author
Member
|
@copilot resolve the merge conflicts in this pull request |
This branch has not been deployed
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.
Fixes #268
What changed
PrivateJsonFile.load()now raises a clearerRuntimeErrorwhen the file contains invalid JSON. It names the file, shows where the JSON is broken and suggests fixing or removing the file. The file itself is left untouched.Example:
Tests
test_load_corrupt_contentintests/rest/auth/test_config.pyfor the new message.pytest tests/rest/auth tests/rest/test_connection.py: 509 passed.This PR was drafted with the help of Claude Code.