Skip to content

sst.aws.StaticSite errorPage throwing a 502 without index set #6848

@nicholasgubbins

Description

@nicholasgubbins

using the current set up to run a static site.

export const docs = new sst.aws.StaticSite("Docs", {
    domain: "docs." + domain,
    path: "./packages/docs",
    dev: false,
    build: {
        command: "bun run build",
        output: "./dist",
    },
    errorPage: "/404.html",
});

i'm running a vitepress site. sst v4.5.1

if i go to docs.domain/404.html i get the page and can verify it's there

however if i go to any actual 404 route, i get a 502 ERROR Failed to contact the origin.

This makes sense because the errorPage should be throwing only in the instance of a 403 or 404 from the origin, but why is the cloudfront function throwing a 502 from a simple s3 file fetch?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions