HF-131 (3/7): a consumer can tell 'no message' from 'empty message' - #1763
marcin-kordas-hoc wants to merge 8 commits into
Conversation
After Tasks 1-2 no engine-produced cell error is message-less, but a custom
function may still return new CellError('VALUE') with no message -- the
documented, still-supported contract. Both cases used to surface identically
as message: ''. DetailedCellError.hasMessage (own enumerable, readonly)
tells them apart: true means a message was set, even a deliberately empty
one; false means none was.
test/_setupFiles/matchers/cellErrorComparison.ts already exists as the
single shared strip-list both toEqualError implementations import (built
during the origin-mechanism work, ahead of this task) -- extended with one
line rather than introducing the second shared-file layout the original
plan draft described, since duplicating the consolidation this task already
has would reopen the exact drift risk that shared module exists to close.
Verified the strip-list entry is load-bearing empirically, not by trusting
the plan's synthetic probe: removing 'hasMessage: undefined' from the list
and running the full suite produces 446 failures; restoring it returns to
baseline.
docs/guide/custom-functions.md gains the note this field's own PR owes it,
per the plan's explicit instruction not to defer a field's documentation to
a later task.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Task linked: HF-131 Verbose and actionable formula error messages |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 07bbd58. Configure here.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hyperformula-docs | 915ca17 | Commit Preview URL Branch Preview URL |
Sep 14 2026, 10:36 AM |
Performance comparison of head (915ca17) vs base (d8cd6cf) |
…at/hf-131-has-message
The JSDoc and the custom-functions guide both said a false hasMessage means the error came from a custom function. An error value typed straight into a cell also has no message, and reports originFunction 'user input'. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…at/hf-131-has-message
…at/hf-131-has-message # Conflicts: # test/_setupFiles/matchers/cellErrorComparison.ts
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/hf-131-error-messages-outside-interpreter #1763 +/- ##
===============================================================================
Coverage 97.39% 97.39%
===============================================================================
Files 195 195
Lines 15843 15844 +1
Branches 3494 3494
===============================================================================
+ Hits 15430 15431 +1
Misses 405 405
Partials 8 8
🚀 New features to boost your workflow:
|
Tobiadefami
left a comment
There was a problem hiding this comment.
Looks good. Verified that hasMessage distinguishes an omitted message from an explicitly empty string, including through cell references.

What and why
Stacked on #1762. Adds
DetailedCellError.hasMessage: boolean.DetailedCellError.messagecollapses two different situations into the same'': an error thatnever carried a message at all (e.g. a custom function that omitted one — the public
CellErrorconstructor keeps
messageoptional), and an error with a deliberately empty message. A consumerthat needs to tell them apart previously couldn't.
hasMessagedoes:truemeans a message wasset (even an empty string),
falsemeans none was.Purely additive — no existing consumer of
.type/.message/.value/.addressneeds a codechange.
toString()/valueOf()are unaffected (both still return.valueonly).Verified
npx tsc --noEmit— cleannpx eslint src/— 0 errorspre-existing branch-pinning mismatch as HF-131 (1/7): every interpreter cell error carries a message #1761/HF-131 (2/7): the origin/propagation mechanism, plus the same guarantee outside the interpreter #1762
Stack
3 of 7 — stacked on #1762. Next:
feat/hf-131-origin-function.🤖 Generated with Claude Code
Note
Low Risk
Additive public field on DetailedCellError with no changes to existing error string behavior or required consumer updates.
Overview
Adds
DetailedCellError.hasMessageso callers can distinguish an error that never had amessagefrom one with a deliberately empty string — both still exposemessageas''.The flag is set in the
DetailedCellErrorconstructor from whether the underlyingCellErrorhadmessagedefined (hasMessage: error.message !== undefined). Existing.type,.message,.value, and.addressbehavior is unchanged;toString()/valueOf()still return only.value.CHANGELOG documents the addition; custom-functions docs explain optional custom
CellErrormessages vs engine errors. TesttoEqualErrorstructural comparison ignoreshasMessagelike other metadata fields.Reviewed by Cursor Bugbot for commit 915ca17. Bugbot is set up for automated code reviews on this repo. Configure here.