Skip to content

fix(examples): drop trailing slash from /v1/shape URLs (fixes yjs demo)#4724

Merged
thruflo merged 1 commit into
mainfrom
vbalegas/fix-yjs-shape-proxy-trailing-slash
Jul 15, 2026
Merged

fix(examples): drop trailing slash from /v1/shape URLs (fixes yjs demo)#4724
thruflo merged 1 commit into
mainfrom
vbalegas/fix-yjs-shape-proxy-trailing-slash

Conversation

@balegas

@balegas balegas commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

What

One-character fix in two examples: ${ELECTRIC_URL}/v1/shape/${ELECTRIC_URL}/v1/shape.

Why

The Electric Cloud API returns 404 {"error":{"code":"ROUTE_NOT_FOUND"}} for /v1/shape/ with a trailing slash (without the slash it routes fine).

This is currently breaking the deployed yjs demo (linked from https://electric-sql.com/sync/demos/yjs): the shape proxy at yjs-server.examples.electric-sql.com/shape-proxy/v1/shape forwards to https://api.electric-sql.cloud/v1/shape/ and passes the 404 through, so the editor loads but stays permanently disconnected, retrying in a loop.

Verified against the live API:

$ curl -s -o /dev/null -w '%{http_code}' 'https://api.electric-sql.cloud/v1/shape/?table=foo&offset=-1'
404   # ROUTE_NOT_FOUND
$ curl -s -o /dev/null -w '%{http_code}' 'https://api.electric-sql.cloud/v1/shape?table=foo&offset=-1'
400   # MISSING_SERVICE_ID — routed correctly, param validation as expected

The same latent pattern existed in linearlite-read-only's client-side shape config, fixed here too.

Deploy

The yjs demo needs a redeploy of the yjs example service after this merges for the fix to take effect.

🤖 Generated with Claude Code

The Electric Cloud API returns 404 ROUTE_NOT_FOUND for /v1/shape/
(with a trailing slash). This broke the deployed yjs demo — the
shape proxy at yjs-server.examples.electric-sql.com forwarded every
request to ${ELECTRIC_URL}/v1/shape/ and passed the 404 through,
leaving the editor permanently disconnected.

Same latent issue fixed in linearlite-read-only's client-side shape
config.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thruflo
thruflo merged commit b9b3a1a into main Jul 15, 2026
14 checks passed
@thruflo
thruflo deleted the vbalegas/fix-yjs-shape-proxy-trailing-slash branch July 15, 2026 23:34
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.

2 participants