Skip to content

fix: remove deprecated "public" field, serve fallback instead of broken error page - #4

Merged
CynthiaWahome merged 2 commits into
feat/cynthia-custom-trophiesfrom
fix/vercel-config-and-fallback
Aug 1, 2026
Merged

fix: remove deprecated "public" field, serve fallback instead of broken error page#4
CynthiaWahome merged 2 commits into
feat/cynthia-custom-trophiesfrom
fix/vercel-config-and-fallback

Conversation

@CynthiaWahome

Copy link
Copy Markdown

Summary

Replaces #3, which was mistakenly based on master (the stale, upstream-tracking branch) instead of feat/cynthia-custom-trophies (the real actively-developed branch with GITHUB_TOKEN1-based logic and the richer stats). Same two fixes, correct base this time.

  1. vercel.json had a top-level "public": true field — a Vercel Platform v1 setting the current schema no longer accepts. Every redeploy was failing outright with Invalid request. Should NOT have additional property "public". Removed — it was already inert under the current platform.
  2. requestUserInfo() failures (bad token, rate limit, genuinely-missing user) all collapsed into the same ServiceError/NOT_FOUND path, rendering the app's "Not Found" HTML error page with a 404 — visibly broken to README visitors. Now serves a static fallback SVG (public/fallback-trophy.svg, rendered from a real snapshot) with status 200 instead. Degraded state only detectable via X-Trophy-Source: fallback header or view-source.

Test plan

  • deno check api/index.ts — no new errors (23 pre-existing, confirmed present before this change via git stash)
  • vercel.json validated as valid JSON
  • Manually inspected public/fallback-trophy.svg — real data, renders correctly

…en error page

Redone against feat/cynthia-custom-trophies instead of master -- master
is the stale upstream-tracking branch (still receiving unrelated
template commits from the original repo), feat/cynthia-custom-trophies
is the actual actively-developed branch with the real GITHUB_TOKEN1-
based trophy logic and richer stats (dev.to articles, lifetime
reviews, org count). The previous PR (#3, since closed) was mistakenly
based on master and would not have reflected on the real deploy.

Two fixes, same as the closed PR:

1. vercel.json had a top-level "public": true field -- a Vercel
   Platform v1 setting the current schema no longer accepts. Every
   redeploy failed outright with:
     Invalid request. Should NOT have additional property "public"
   Removing it doesn't change any actual behavior, it was already
   inert under the current platform version.

2. requestUserInfo() failures (bad token, rate limit, or a genuinely
   missing user) all collapsed into the same ServiceError/NOT_FOUND
   path, rendering the app's own "Not Found" HTML error page with a
   404 status -- visibly broken to anyone viewing the README. Now
   serves a static fallback SVG (public/fallback-trophy.svg, rendered
   from a real snapshot via scripts/generate-fallback-trophy.ts) with
   status 200 instead. Degraded state only detectable via the
   X-Trophy-Source: fallback response header or view-source, never in
   the rendered card.
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cynthia-profile-trophy Ready Ready Preview Aug 1, 2026 10:52am

Direct instruction: witty/visible error states should show, especially
while the underlying token issue is unresolved -- a visibly-styled
error page doubles as its own "something's wrong" signal, which makes
the separate silent-fallback-plus-hidden-header mechanism from the
previous commit unnecessary complexity now.

Restored the ErrorPage import/render call, removed the now-unused
fallback mechanism (public/fallback-trophy.svg, scripts/generate-
fallback-trophy.ts, src/fallbackTrophy.ts) rather than leaving dead
code behind.

The vercel.json "public" field removal from the previous commit is
untouched -- that's the actual deploy blocker fix and stays.
@CynthiaWahome
CynthiaWahome merged commit be5fee0 into feat/cynthia-custom-trophies Aug 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant