Skip to content

fix(web): distinguish 404 errors from network/server failures#605

Open
IshitaMittal29 wants to merge 1 commit into
Dev-Card:mainfrom
IshitaMittal29:fix-profile-card-error-handling
Open

fix(web): distinguish 404 errors from network/server failures#605
IshitaMittal29 wants to merge 1 commit into
Dev-Card:mainfrom
IshitaMittal29:fix-profile-card-error-handling

Conversation

@IshitaMittal29

@IshitaMittal29 IshitaMittal29 commented Jun 18, 2026

Copy link
Copy Markdown

Summary

Fixes the issue where Profile and Card pages displayed "not found" messages for all API failures, including network and server errors.

Closes #603


Type of Change

  • Bug fix

What Changed

  • Added status-aware error handling using ApiError.
  • Preserved "Profile not found" and "Card not found" messages only for genuine 404 responses.
  • Added user-friendly error messages for network/server failures on ProfilePage and CardPage.

How to Test

  1. Run the frontend with the backend unavailable.
  2. Visit any profile (/u/test) or card (/devcard/test) page.
  3. Verify that a server error message is shown instead of a "not found" message.
  4. Verify that genuine 404 responses still show "Profile not found" or "Card not found".

Checklist

  • TypeScript compiles without errors.
  • No debug statements left in the code.
  • Tests added/updated (not applicable for this change).
  • Documentation update required.
  • Breaking changes.

Screenshots

Screenshot 2026-06-19 003351 Screenshot 2026-06-19 003333

Additional Context

Previously, all API failures were treated as "not found" responses. This change distinguishes genuine 404 responses from network/server failures, providing more accurate feedback to users.

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Prashantkumar Khatri's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. web labels Jun 18, 2026
@github-actions

Copy link
Copy Markdown

Hi @IshitaMittal29,

Thanks for opening this pull request.

This PR has been automatically classified based on the files modified.

Applied Labels

  • gssoc:approved
  • web

Primary Review Area

  • web

Reviewer

@ShantKhatri has been identified as the primary reviewer for this pull request.

If you have any questions regarding the affected area or implementation details, feel free to reach out to the assigned reviewer.

Thank you for your contribution!

@github-actions

Copy link
Copy Markdown

CI — All Checks Passed

Backend — SKIP

Check Result
Lint -
Test -
Typecheck -

Mobile — SKIP

Check Result
Lint -
Test -

Web — PASS

Check Result
Build PASS

Last updated: Thu, 18 Jun 2026 19:18:18 GMT

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

Labels

gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profile and Card pages show "Not Found" for network/server errors

1 participant