Skip to content

Commit ecf4d39

Browse files
doc: improve ERR_AMBIGUOUS_ARGUMENT error message clarity
Improves clarity of ERR_AMBIGUOUS_ARGUMENT by making the message more actionable and guiding users to provide explicit values or options objects. No behavior change.
1 parent f1ed8d6 commit ecf4d39

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/internal/errors.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,11 @@ E('ERR_ACCESS_DENIED',
11331133
return msg;
11341134
},
11351135
Error);
1136-
E('ERR_AMBIGUOUS_ARGUMENT', 'The "%s" argument is ambiguous. %s', TypeError);
1136+
E(
1137+
'ERR_AMBIGUOUS_ARGUMENT',
1138+
'The "%s" argument is ambiguous. %s Please check the function signature and provide a more explicit value or options object.',
1139+
TypeError
1140+
);
11371141
E('ERR_ARG_NOT_ITERABLE', '%s must be iterable', TypeError);
11381142
E('ERR_ASSERTION', '%s', Error);
11391143
E('ERR_ASYNC_CALLBACK', '%s must be a function', TypeError);

0 commit comments

Comments
 (0)