Skip to content

fix: return not found for unknown page conversations - #14

Open
charan-rathore wants to merge 1 commit into
CopilotKit:mainfrom
charan-rathore:fix-page-conversation-404
Open

charan-rathore wants to merge 1 commit into
CopilotKit:mainfrom
charan-rathore:fix-page-conversation-404

Conversation

@charan-rathore

Copy link
Copy Markdown

What this fixes

On the page routes, asking for a conversation id that does not exist (or belongs to someone else) returned a generic 503 telling the user to check the Intelligence setup. That points at the wrong thing: the caller used a bad conversation id.

Changes

  • The exact conversation-owner lookup error on page routes now returns 404.
  • Real Intelligence errors still return the generic 503, and the response text does not leak more than before.
  • It does not turn other errors into client errors.

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.ts and tests/page-routes.test.ts. Open PR #11 changes workspace-routes.ts and also adds a test to tests/page-routes.test.ts, so whichever lands second may need a small rebase on the test file. The code changes do not overlap.

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