-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Problem / Motivation
If you request an avatar for a GitHub username that doesn't exist (e.g., /a-truly-non-existent-user-12345), the API currently returns a generic 404 Not Found error. This can result in a broken image icon on websites using the API. A better user experience would be to return a default or "user not found" placeholder image.
Proposed Solution
Modify the main request handler in main.ts. When the call to getAvatarUrl() fails or returns a "not found" status, instead of setting ctx.response.status = 404, the API should:
Have a default placeholder image (e.g., a simple question mark or GitHub's Octocat logo) stored in the frames/ directory, named something like not-found.png.
Serve this placeholder image as the response, just like it serves the generated avatars. This provides a graceful fallback and avoids broken images.
PLEASE ASSIGN ME THIS ISSUE UNDER THE GSSOC' 25 LABEL. THANK YOU.