Repository navigation
HF-131 (3/7): a consumer can tell 'no message' from 'empty message' - #1763
marcin-kordas-hoc wants to merge 10 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 | 9d436c4 | Commit Preview URL Branch Preview URL |
Oct 23 2026, 07:17 AM |
Performance comparison of head (9d436c4) vs base (c5feea6) |
…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
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.
…-has-message # Conflicts: # CHANGELOG.md
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.34% 97.34%
===============================================================================
Files 207 207
Lines 16322 16323 +1
Branches 3621 3621
===============================================================================
+ Hits 15889 15890 +1
Misses 425 425
Partials 8 8
🚀 New features to boost your workflow:
|

Context
The PR adds
DetailedCellError.hasMessage, so a consumer can tell an error with no message from one with an empty message. It is part 3 of 7 of HF-131, stacked on #1762.DetailedCellError.messageis''both when the error had no message and when the message was deliberately empty. A custom function may omit the message, because theCellErrorconstructor keeps it optional.hyperformula/src/CellValue.ts:hasMessageistruewhen the underlyingCellErrorhas a message, even an empty one.docs/guide/custom-functions.md: one paragraph onmessageandhasMessage.hyperformula/test/_setupFiles/matchers/cellErrorComparison.ts:toEqualErrorignores the new field.=1/0reportshasMessage: true; an error value typed into a cell reportshasMessage: falseandmessage: ''.How did you test your changes?
feat/hf-131-has-message, with 4 new tests inunit/CellValueExporter.spec.ts.Compatibility with Excel and Google Sheets
Not applicable: no formula result changes.
Public API changes
DetailedCellError.hasMessage: boolean(new, read-only).toString()andvalueOf()are unchanged.Out of scope and follow-ups
None.
Types of changes
Related issues
Checklist
dev-docs/pages this change affects – or none needed it.