sveltejs / sveltejs/kit

Report all prerendering HTTP errors

Open
#12,859 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the problem

When prerendering, links that 404 will cause the build to fail by default. This is a nuisance if you're migrating a large site with many broken links, because the build fails immediately meaning you only see the first error that's encountered, making the feedback loop excruciatingly slow.

While you can configure SvelteKit not to fail on HTTP errors during prerendering, with handleHttpError, that's not a solution because it allows deployments with broken links.

So ideally it would be possible to collect the errors and report them all at the end, instead of failing immediately (though that might also be a nuisance for people who want the early failure).

Describe the proposed solution

I have no idea!

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating SvelteKit's prerendering error-handling and build-reporting entry points; the issue names no files or tests. Define how multiple HTTP errors should be collected and reported, including whether early failure remains available. Done means a prerendered build reports all encountered HTTP errors without allowing a successful deployment with broken links.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.