fix: remove deprecated "public" field, serve fallback instead of broken error page - #4
Merged
CynthiaWahome merged 2 commits intoAug 1, 2026
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces #3, which was mistakenly based on
master(the stale, upstream-tracking branch) instead offeat/cynthia-custom-trophies(the real actively-developed branch withGITHUB_TOKEN1-based logic and the richer stats). Same two fixes, correct base this time.vercel.jsonhad a top-level"public": truefield — a Vercel Platform v1 setting the current schema no longer accepts. Every redeploy was failing outright withInvalid request. Should NOT have additional property "public". Removed — it was already inert under the current platform.requestUserInfo()failures (bad token, rate limit, genuinely-missing user) all collapsed into the sameServiceError/NOT_FOUNDpath, 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 viaX-Trophy-Source: fallbackheader or view-source.Test plan
deno check api/index.ts— no new errors (23 pre-existing, confirmed present before this change viagit stash)vercel.jsonvalidated as valid JSONpublic/fallback-trophy.svg— real data, renders correctly