Skip to content

fix(client): handle stream start rejection in subscribe#4738

Open
shivanshgupta365 wants to merge 1 commit into
electric-sql:mainfrom
shivanshgupta365:fix/subscribe-unhandled-start-rejection
Open

fix(client): handle stream start rejection in subscribe#4738
shivanshgupta365 wants to merge 1 commit into
electric-sql:mainfrom
shivanshgupta365:fix/subscribe-unhandled-start-rejection

Conversation

@shivanshgupta365

Copy link
Copy Markdown

Summary

  • handle the fire-and-forget start promise created by ShapeStream.subscribe
  • keep fatal errors delivered through the subscriber error callback without also producing a process-level unhandled rejection
  • add a regression test for the Node/Bun failure path

Fixes #4736

Validation

  • 35 ShapeStream unit tests passed
  • TypeScript client typecheck passed
  • TypeScript client build passed
  • ESLint, Prettier, and lint-staged passed

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.

subscribe(): this.#start() missing .catch() causes unhandled promise rejection crash in Node.js/Bun

1 participant