Ci/verify load errors - #101
Open
Pascal-SAPUI5 wants to merge 2 commits into
Open
Conversation
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>
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.
No description provided.