Skip to content

Profile Page Displays 404 Error for Unauthenticated Users #70

@kritikarma2007

Description

@kritikarma2007

When a user who is not logged in clicks on the Profile section, the application navigates to /profile/undefined and displays a raw 404 error message.

This creates a poor user experience, as users are shown a technical error instead of being guided to log in or create an account.

Steps to Reproduce
Open the application without logging in.
click on Browse questions then
Click on Profile from the sidebar.
Observe the 404 error message on the profile page.
Expected Behavior

The application should detect that the user is not authenticated and display a user-friendly message or redirect the user to the login/signup page.

Actual Behavior

The application navigates to an invalid profile route and displays:
"Error loading profile: Request failed with status code 404"

Screenshot

Image

Attached the screenshot showing the error state.

Suggested Labels

bug, gssoc26, frontend, ui-ux, error-handling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions