Skip to content

Fix data preview "Server Error" for collections with more than 25 journals#2014

Open
jshearer wants to merge 1 commit into
mainfrom
jshearer/fix-data-preview-server-error
Open

Fix data preview "Server Error" for collections with more than 25 journals#2014
jshearer wants to merge 1 commit into
mainfrom
jshearer/fix-data-preview-server-error

Conversation

@jshearer

@jshearer jshearer commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What

Data Preview showed Server Error instead of sample documents for any collection split into more than 25 journals.

Root cause

Gazette's List RPC is server-streaming and returns the journal list as one or more newline-delimited {result: ListResponse} frames. gazette/core#466 lowered the per-frame cap (maxJournalsPerListResponse) from 1000 to 25, so once that build shipped, collections split more than 25 ways began coming back as multiple frames. The UI's getJournals parsed the body with a single response.json(), which handles only one frame and threw on the second. That surfaced as the generic FETCH_DEFAULT_ERROR ("Server Error"), and because the list call failed the preview never selected a journal to read.

Fix

estuary/data-plane-gateway#51 fixes JournalClient.list() to drain the stream and merge every frame (matching what read() already does), returning the full ProtocolListResponse. This PR vendors that build and migrates onto it:

  • Bump the vendored data-plane-gateway tarball.
  • useJournalsForCollection calls journalClient.list() and reads .journals directly.
  • Remove the now-dead getJournals and isNestedProtocolListResponse helpers.

Data preview still samples a single journal as before; handling multiple frames just lets the list parse.

Depends on estuary/data-plane-gateway#51.

…urnals

The broker's journal `List` RPC is server-streaming and caps each `ListResponse` frame at 25 journals (gazette/core#466, down from 1000), so a collection split more than 25 ways returns its listing as several newline-delimited frames. `getJournals` parsed the body with a single `response.json()`, which failed on the second frame and surfaced as the generic "Server Error", leaving the preview with no journal to read.

* Bump vendored `data-plane-gateway` to a build whose `JournalClient.list()` consumes the stream and merges every frame (estuary/data-plane-gateway#51).
* Call `journalClient.list()` directly and remove the now-dead `getJournals` and `isNestedProtocolListResponse` helpers.
@jshearer jshearer requested a review from a team as a code owner June 23, 2026 01:02
@jshearer jshearer self-assigned this Jun 23, 2026
@jshearer jshearer added the bug Something isn't working label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant