Skip to content

Treat a 404 Failed. as unsupported instead of a fatal error - #2

Merged
sammykumar merged 1 commit into
mainfrom
fix/failed-404
Oct 3, 2026
Merged

sammykumar merged 1 commit into
mainfrom
fix/failed-404

Conversation

@sammykumar

Copy link
Copy Markdown
Owner

Problem

After moving to BetterDisplay 5.0.6 the entry sat in setup_retry with reason Failed., logging Error fetching betterdisplay data: Failed. every refresh. BetterDisplay 5.0.6 answers an unsupported read with HTTP 404 Failed. (not 200), and _request raised on any non-200 before _get could recognise the sentinel. One unsupported read — the Odyssey G95NC's hardwareBacklight, verified returning 404 while every other read returns 200 — took down every refresh.

Fix

_request returns the body for a 404 Failed., 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

  • Live: get?…&hardwareBacklight on the G95NC → 404 Failed.; all other reads → 200.
  • New tests: a 404 Failed. read returns None; a 404 Failed. write raises. 70 tests pass; ruff clean.

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.
@sammykumar
sammykumar merged commit e4478e3 into main Oct 3, 2026
4 checks passed
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.

1 participant