Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Prevent client to rerender page over SSR error - fixes #710 #719

Merged
merged 4 commits into from
Jun 1, 2020

Conversation

rixo
Copy link
Contributor

@rixo rixo commented May 30, 2019

The preload error was serialized to null in preloaded data, so the client thought it got error free preloaded data and rendered the page over the error.

That what's caused the error to disappear (coupled with custom _layout.svelte).

But to make things worse, the client doesn't even have data to render at this point.

@benmccann
Copy link
Member

Closes #710

@benmccann
Copy link
Member

benmccann commented May 29, 2020

Aye aye aye!!!! I'm going a little bit insane (or a lot bit). This is the third separate issue I've hit this week with Sapper swallowing errors 😭 (in addition to #1234 and #1221)

Anyway, I've merged this into my fork and confirmed it works. I'm now getting a stack trace instead of everything looking hunky dory. The stack trace does show the correct line though it's a little tricky to use because it shows the line number in __sapper__/dev/server/server.js, which has thousands of lines of unrelated code. It'd be nice if we could use a source map to show the original error location. But that's a separate issue (#773)

This would be a great one to merge

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants