fix(messages): return errors on load failure#190
Open
MicroMilo wants to merge 1 commit into
Open
Conversation
Author
|
Validation note: This PR fixes an API semantics bug in the session message loading workflow. Before this change, a failure in the message read path was returned as HTTP 200 with an empty message list. That made two different states indistinguishable to API consumers:
This PR changes the failure path to return HTTP 500 with an Validation commands currently listed by this PR: npm --workspace ui test
npm exec -- tsc --noEmit -p tsconfig.jsonThe API behavior change is correct, but the self-validation should be more focused. A route-level regression test should mock the message read function to throw and assert that:
That test would prove the fixed failure semantics directly. |
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.
Summary
Verification
Notes
This is a real API semantics bug: the previous route converted read failures into HTTP 200 empty message lists, making failures indistinguishable from an empty session.