Skip to content

Show technical error details - #106

Merged
SiteRelEnby merged 1 commit into
mainfrom
feat/technical-error-details
Oct 23, 2026
Merged

SiteRelEnby merged 1 commit into
mainfrom
feat/technical-error-details

Conversation

@SiteRelEnby

@SiteRelEnby SiteRelEnby commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Brings across the web app's "Show technical error details" setting. Android had no equivalent, and the gap was wider than a missing checkbox: the server's detail was not merely unused but actively discarded, because toUserMessage read the error body only to sniff for Cloudflare and then threw it away. There was no path by which a server message reached a user, on any screen.

Settings, About gains the switch, off by default. On, an HTTP failure reads [404] Field not found; off, it reads Not found as before.

The web app has had a "Show technical error details" setting for a while.
Android had nothing: every failure read as a canned sentence chosen by status
code, and the server's own `detail` was not merely unused but actively thrown
away, since toUserMessage read the error body only to sniff for Cloudflare and
then discarded it. There was no path by which a server message reached a user.

Settings, About gains the switch, off by default. On, an HTTP failure reads
"[404] Field not found" and anything else names the exception behind it, which
is the part a bug report was missing: four causes collapse into one sentence in
the friendly register.

About rather than a category of its own, which is where web keeps it. That
screen is already the one somebody opens to copy a version, a commit and a
server address into a report, and this changes what a report can say. Not the
Debug Menu despite the name fitting: that row is behind BuildConfig.DEBUG, and
the people who need this are on release builds.

Three things worth saying about the shape:

The preference is kept on the device as well as in the account's client
settings. The account copy is what syncs between Android devices, but it
arrives with the first successful load, and the failures this setting exists to
explain are exactly the ones where that load does not happen. A preference you
have to fetch is off precisely when somebody is trying to find out why nothing
is loading. Verified by toggling it with the backend stopped.

Reading `detail` now peeks the body instead of consuming it. An error body is a
one-shot stream and `string()` closes it, which is why the sharing flows read it
defensively and warned about toUserMessage racing them. Two readers on one
exception is now the normal case rather than something to avoid.

The client id is the platform, so turning this on in a browser does not turn it
on here. A status code in a toast is least wanted on a phone, and the two
clients disagreeing about that is the intent rather than a gap.

Also fixes an inconsistency this surfaced. The sharing classifier, which tells
step-up from bad credentials from publishing-is-off, carried a second table of
per-status wordings for everything else, so the same status could read two ways
depending on which call failed, and the new setting did nothing on any screen
that routed through it (custom fields among them). Unclassified failures now go
through the same formatter, keeping the server's prose where that is the useful
part. The classified states keep their own wording: they are states with their
own UI, and a status code in front of the step-up sheet's "incorrect password"
would read as a fault rather than a prompt.

Checked on device against a real instance: off and on for a network failure
with the backend stopped, a 422 whose list-shaped detail correctly falls back
to the summary rather than dumping JSON, and a 404 on a field deleted out from
under the screen, which showed a bare "Field not found" before the classifier
change and "[404] Field not found" after.
@SiteRelEnby
SiteRelEnby force-pushed the feat/technical-error-details branch from c3582cf to 3f164de Compare October 23, 2026 23:48
@SiteRelEnby
SiteRelEnby enabled auto-merge October 23, 2026 23:50
@SiteRelEnby
SiteRelEnby merged commit 7a0b261 into main Oct 23, 2026
1 check passed
@SiteRelEnby
SiteRelEnby deleted the feat/technical-error-details branch October 23, 2026 23:55
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