node icon indicating copy to clipboard operation
node copied to clipboard

lib: fix default AbortController.abort() message

Open nektro opened this issue 7 months ago β€’ 5 comments
trafficstars

did not previously match spec https://dom.spec.whatwg.org/#dom-abortsignal-abort https://webidl.spec.whatwg.org/#aborterror

nektro avatar Apr 02 '25 21:04 nektro

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 90.24%. Comparing base (5a2614f) to head (1ab2db6). :warning: Report is 1177 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57735      +/-   ##
==========================================
+ Coverage   90.23%   90.24%   +0.01%     
==========================================
  Files         630      630              
  Lines      185074   184982      -92     
  Branches    36221    36218       -3     
==========================================
- Hits       166994   166946      -48     
+ Misses      11036    10990      -46     
- Partials     7044     7046       +2     
Files with missing lines Coverage Ξ”
lib/internal/abort_controller.js 98.14% <100.00%> (ΓΈ)

... and 54 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Apr 02 '25 23:04 codecov[bot]

Where does the spec dictate that the description must be the error message?

For example I'm pretty sure if we implemented URLMismatchError its message wouldn't be "Deprecated.".

KhafraDev avatar Apr 03 '25 17:04 KhafraDev

taking another look, https://webidl.spec.whatwg.org/#js-creating-throwing-exceptions for DOMException says message is implementation defined.

initially opened this because while investigating other code we noticed Safari, Firefox, Bun use the default description from the spec Node's message was the default one sans only the period Chrome's message is signal is aborted without reason Ladybird's message is Aborted without reason workerd's message is the default one sans only the period

nektro avatar Apr 03 '25 21:04 nektro

See https://nodejs.org/api/errors.html#errorcode, error message can be changed in any versions of Node.js. I don't think this is necessarily a semver major change.

legendecas avatar Apr 07 '25 10:04 legendecas

Mostly being careful because this will break things, mostly tests https://github.com/search?q=%22This+operation+was+aborted%22&type=code

KhafraDev avatar Apr 07 '25 13:04 KhafraDev

bump

nektro avatar Sep 06 '25 03:09 nektro