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
Attached the screenshot showing the error state.
Suggested Labels
bug, gssoc26, frontend, ui-ux, error-handling
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
Attached the screenshot showing the error state.
Suggested Labels
bug, gssoc26, frontend, ui-ux, error-handling