kit icon indicating copy to clipboard operation
kit copied to clipboard

Weird behavior between an old client and a new server

Open GauBen opened this issue 2 years ago • 0 comments

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 image image

Alert 2 image image

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

GauBen avatar May 29 '23 15:05 GauBen