Skip to content

Ci/verify load errors - #101

Open
Pascal-SAPUI5 wants to merge 2 commits into
InteractionEngineer:mainfrom
Pascal-SAPUI5:ci/verify-load-errors
Open

Ci/verify load errors#101
Pascal-SAPUI5 wants to merge 2 commits into
InteractionEngineer:mainfrom
Pascal-SAPUI5:ci/verify-load-errors

Conversation

@Pascal-SAPUI5

Copy link
Copy Markdown

No description provided.

Pascal-SAPUI5 and others added 2 commits August 23, 2026 13:29
Changing a project's password on the server left PayForMe showing empty lists
and no explanation. The same happened for a deleted project, an unreachable
server, or an address that is not a Cospend or iHateMoney instance at all.

The cause was structural. Both load publishers declared `Never` as their
failure type, so every failure had to become a value before it could leave
NetworkService: an HTTP status other than 200 was dropped by a `compactMap`,
and a URLError was turned into `[]` by `replaceError`. An empty list is exactly
what a project with no bills looks like, so nothing upstream could tell the two
apart — and nothing did.

Both publishers now fail with a `LoadError`, ProjectManager keeps the last
failure, and ContentView shows it. The message names what happened: a rejected
password suggests adding the project again with the new one, which is the
action the reporter needed and could not guess.

The type is called LoadError rather than ServerError because NetworkService
already nests a `ServerError` of its own, and a second one under the same name
resolves differently inside and outside the class.

The two existing tests that pinned the old behaviour are rewritten rather than
deleted — one of them already carried the note "should [emit] when proper
feedback is implemented".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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