Skip to content

ErrorBoundary: SSG bakes a caught error's fallback at 200 and reports success #8977

Closed

Description

@maiieul

Describe

During a static build (mode: 'static'), an <ErrorBoundary> catch does not fail the route. The render succeeds, the fallback streams, and the status stays 200.

  • The SSG worker judges success by status only: result.ok = (status >= 200 && status < 300) || … (packages/qwik-router/src/ssg/worker-thread.ts).
  • No SSG code reads RenderToStreamResult.errorBoundaryCaught (added in feat(core): core ErrorBoundary in SSR and CSR #8745).

Result: a build-time blip bakes the fallback into the static HTML. The build reports success. Crawlers index the fallback. A retry button has no live endpoint to hit.

Expected

  • The static build fails the route when a boundary catches, the same as a rejected render. errorBoundaryCaught is the hook.
  • Optional: a generator retry knob — re-render the route N times before the build fails.

Notes

Follow-up to #8745. Applies to every error kind, not to one error class.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions