Skip to content

Unmatched /v2 URLs show Astro's default 404 page instead of the branded one #46348

Open

Description

@WolfieLeader

Description

Opening a /v2 URL that does not exist, like https://opencode.ai/v2/docs.md, shows Astro's stock "404: Not found" page instead of the branded 404 the main site has (compare https://opencode.ai/docs.md). A wrong docs slug like /v2/docs/bogus-page returns plain text "Not found".

Steps to reproduce

  1. Open https://opencode.ai/v2/not-found
  2. See the default Astro 404 page

Expected: the branded OpenCode 404 page, like the one on https://opencode.ai/docs.md

image

Activity

  1. opencodejr commented on Oct 28, 2026

    @opencodejr

    Thanks for the report, I can confirm this on opencode.ai:

    • /v2/not-found and /v2/docs.md return 404 with Astro's stock "404: Not Found" page.
    • /v2/docs/bogus-page returns 404 with the plain-text body Not found.
    • /docs.md returns the branded OpenCode 404 page.

    The current dev source (06d3c06) is unchanged: the v2 site (services/www) still has no 404.astro, and the docs slug route still returns a plain-text Not found response. I checked this by reading the code rather than running the site locally. The script below runs the curl checks. Related: #56800, where /v2/docs/ecosystem is a 404.

    Reproduction script (check-404.sh)
    #!/usr/bin/env bash
    # Reproduces #46348: unmatched /v2 URLs on opencode.ai don't use the branded 404 page.
    set -u
    tmp=$(mktemp)
    for u in https://opencode.ai/v2/not-found https://opencode.ai/v2/docs.md https://opencode.ai/v2/docs/bogus-page https://opencode.ai/docs.md; do
      code=$(curl -s -o "$tmp" -w "%{http_code} %{content_type}" "$u")
      title=$(grep -o '<title>[^<]*' "$tmp" | head -1 | sed 's/<title>//')
      echo "$u -> $code | title: ${title:-<none>} | body starts: $(head -c 60 "$tmp" | tr '\n' ' ')"
    done
    rm -f "$tmp"
    # Expected: /v2/* 404s render the branded OpenCode 404 like /docs.md does.
    # Actual: /v2/not-found and /v2/docs.md -> Astro's stock "404: Not Found" page;
    #         /v2/docs/bogus-page -> plain text "Not found".

    Run it: bash check-404.sh

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions