Weird behavior between an old client and a new server
Describe the bug
I'm observing weird interactions between a client and a newly deployed server instance.
Here's what I guess happens, with no absolute certainty:
- A user goes to example.com, a svelte-kit site with SSR and client-side router
- We deploy a new version of example.com
- The user clicks on a button that runs
invalidateAll() - Chaos ensues
The following "non errors" were captured on our Sentry:
Alert 1
![]()
Alert 2
![]()
After investing both the minified and original code, this lead me to
https://github.com/sveltejs/kit/blob/10008b35e7194be1d9e54347731cab772b511ee4/packages/kit/src/runtime/client/client.js#L1813-L1817
This is the non-Error object with body and status keys that end up in Sentry
This is the only place in svelte-kit that returns 400 errors, and it's not JSON-formatted, which might explain why message ends up empty (see screenshots above)
https://github.com/sveltejs/kit/blob/10008b35e7194be1d9e54347731cab772b511ee4/packages/kit/src/runtime/server/respond.js#L78
I'm stopping my investigation here, but I can continue if need be
Reproduction
Did not manage to create one yet
Logs
Non-Error exception captured with keys: body, status
System Info
Svelte-kit 1.15.1
Severity
annoyance
Additional Information
No response