fix: return not found for unknown page conversations - #14
Open
charan-rathore wants to merge 1 commit into
Open
charan-rathore wants to merge 1 commit into
charan-rathore wants to merge 1 commit into
Conversation
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.
What this fixes
On the page routes, asking for a conversation id that does not exist (or belongs to someone else) returned a generic
503telling the user to check the Intelligence setup. That points at the wrong thing: the caller used a bad conversation id.Changes
404.503, and the response text does not leak more than before.Tests
Four endpoint regression tests (they fail on the base commit), including one that checks genuine Intelligence errors stay
503.Results below are from the person who prepared the change; I did not rerun them. Full suite: 34 files, 161 tests pass. Lint, typecheck, format check and production build pass (the build prints a chunk size warning that was already there). No UI or dependency changes.
Note
This touches
src/server/page-routes.tsandtests/page-routes.test.ts. Open PR #11 changesworkspace-routes.tsand also adds a test totests/page-routes.test.ts, so whichever lands second may need a small rebase on the test file. The code changes do not overlap.