Skip to content

chore: fix auth error message#1024

Merged
ghostdevv merged 3 commits intonpmx-dev:mainfrom
iiio2:chore/fix-auth-error-message
Feb 6, 2026
Merged

chore: fix auth error message#1024
ghostdevv merged 3 commits intonpmx-dev:mainfrom
iiio2:chore/fix-auth-error-message

Conversation

@iiio2
Copy link
Copy Markdown
Contributor

@iiio2 iiio2 commented Feb 5, 2026

Suppose, if we click the Connect to Atmosphere modal and then provide invalid username in the input field and click on connect button, it throws error as 410 - Server Error.

I think 401 error message is not related to server error. 401 should not unauthorized. Server error starts from 500.

Wrong:
wrong

Correct:
right

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs.npmx.dev Error Error Feb 6, 2026 11:19pm
npmx.dev Ready Ready Preview, Comment Feb 6, 2026 11:19pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Feb 6, 2026 11:19pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

Adds optional statusMessage?: string to the ErrorOptions type; updates the server-side error handler to apply fallback statusCode and statusMessage more selectively and to include statusMessage in fallback branch; includes a statusMessage: 'Unauthorized' for authentication API 401 responses; and updates the client error display logic to explicitly handle HTTP 401 by using the statusMessage when present.

Possibly related PRs

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly explains the issue: a 401 authentication error was incorrectly showing 'Server Error' instead of 'Unauthorized', with visual examples demonstrating the before and after states. The description directly relates to the changeset which adds statusMessage handling for 401 errors across multiple files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/error.vue 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@danielroe
Copy link
Copy Markdown
Member

would you take a look at the failing tests? 🙏

@iiio2
Copy link
Copy Markdown
Contributor Author

iiio2 commented Feb 5, 2026

@danielroe , I think I've done it.

@ghostdevv ghostdevv enabled auto-merge February 6, 2026 23:18
@ghostdevv ghostdevv added this pull request to the merge queue Feb 6, 2026
Merged via the queue into npmx-dev:main with commit 3cf7fef Feb 6, 2026
15 of 17 checks passed
@iiio2
Copy link
Copy Markdown
Contributor Author

iiio2 commented Feb 7, 2026

Thanks.

@iiio2 iiio2 deleted the chore/fix-auth-error-message branch February 7, 2026 03:05
whitep4nth3r pushed a commit that referenced this pull request Feb 7, 2026
Co-authored-by: Willow (GHOST) <ghostdevbusiness@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants