Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More informative error messages in prerendering #982

Closed
Rich-Harris opened this issue Apr 12, 2021 · 0 comments · Fixed by #1062
Closed

More informative error messages in prerendering #982

Rich-Harris opened this issue Apr 12, 2021 · 0 comments · Fixed by #1062
Milestone

Comments

@Rich-Harris
Copy link
Member

Is your feature request related to a problem? Please describe.
If a page errors during prerendering, you see something like this in your terminal:

500 /foo

This isn't very helpful for diagnosing the underlying error. If it happens locally, you can svelte-kit start and navigate to /foo and see what happened, but if it happens in CI it's a pain (and sometimes errors only happen in CI).

Describe the solution you'd like
It would be helpful if this code...

const rendered = await app.render(
{
host: config.kit.host,
method: 'GET',
headers: {},
path,
body: null,
query: new URLSearchParams()
},
{
local: true,
dependencies,
only_render_prerenderable_pages: !force,
get_static_file: (file) => readFileSync(join(config.kit.files.assets, file))
}
);
...somehow gave access to the underlying error. It probably shouldn't be on the response directly, but it could maybe be passed back via a side-channel, a la dependencies.

Describe alternatives you've considered
None

How important is this feature to you?
Nice-to-have

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

Successfully merging a pull request may close this issue.

2 participants