Skip to content

fix: correct typo in Either error message ("non" → "none")#3183

Merged
Brooooooklyn merged 1 commit intonapi-rs:mainfrom
55728:fix/either-error-message-typo
Apr 2, 2026
Merged

fix: correct typo in Either error message ("non" → "none")#3183
Brooooooklyn merged 1 commit intonapi-rs:mainfrom
55728:fix/either-error-message-typo

Conversation

@55728
Copy link
Copy Markdown
Contributor

@55728 55728 commented Apr 2, 2026

Fix a typo in the error message for Either type validation failure.

  • Before: Value is non of these types
  • After: Value is none of these types

"non" is a prefix (e.g., non-null), not a pronoun. The correct word here is "none".

This error message surfaces to end users through Rolldown / Vite 8 (e.g., vitejs/vite#22095), so correcting it improves the debugging experience.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected error message text displayed when an invalid value is provided to the API.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1bf4a6a9-0b26-43fc-a108-98a44c36aefb

📥 Commits

Reviewing files that changed from the base of the PR and between d14ed15 and afb2295.

📒 Files selected for processing (1)
  • crates/napi/src/bindgen_runtime/js_values/either.rs

📝 Walkthrough

Walkthrough

A typo in an error message within the either_n! macro was corrected, changing "non" to "none" in the FromNapiValue implementation's Status::InvalidArg error report.

Changes

Cohort / File(s) Summary
Error Message Typo Fix
crates/napi/src/bindgen_runtime/js_values/either.rs
Corrected error message text from "Value is non of these types" to "Value is none of these types" in the either_n! macro.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A tiny typo, "non" to "none",
The rabbit's edit caught and done,
Error messages now ring true,
One small fix, a perfect view! 🐰✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: a typo correction in the Either error message from 'non' to 'none', which matches the file-level summary and PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Brooooooklyn Brooooooklyn merged commit 2e3748f into napi-rs:main Apr 2, 2026
1 check passed
@github-actions github-actions Bot mentioned this pull request Apr 2, 2026
@55728 55728 deleted the fix/either-error-message-typo branch April 2, 2026 15:22
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.

2 participants