Repository navigation
Treat a 404 Failed. as unsupported instead of a fatal error - #2
Merged
Merged
Conversation
BetterDisplay 5.0.6 answers an unsupported read with a 404 Failed. rather than a 200, and _request raised on it before _get could see the sentinel, so one unsupported read (the Odyssey's hardwareBacklight) failed every refresh and left the entry stuck in setup_retry. Return the sentinel body for a 404 Failed. so reads report the feature as unsupported and writes still raise. Bump to 0.1.3.
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.
Problem
After moving to BetterDisplay 5.0.6 the entry sat in
setup_retrywith reasonFailed., loggingError fetching betterdisplay data: Failed.every refresh. BetterDisplay 5.0.6 answers an unsupported read with HTTP 404Failed.(not 200), and_requestraised on any non-200 before_getcould recognise the sentinel. One unsupported read — the Odyssey G95NC'shardwareBacklight, verified returning 404 while every other read returns 200 — took down every refresh.Fix
_requestreturns the body for a 404Failed., so reads report the feature as unsupported (as with the 200 form) and writes still raise via the existing sentinel checks. README note corrected. Version 0.1.3.Verified
get?…&hardwareBacklighton the G95NC → 404Failed.; all other reads → 200.Failed.read returns None; a 404Failed.write raises. 70 tests pass; ruff clean.