Skip to content

Values for --unhandled-rejection flag added in v15 are not in --help (and default value is not indicated) #37896

Closed
@glasser

Description

@glasser
  • Version: v15.12.0 (issue exists on main and has existed since v15.0.0)
  • Platform: Darwin dsg-mbp 18.7.0 Darwin Kernel Version 18.7.0: Tue Nov 10 00:07:31 PST 2020; root:xnu-4903.278.51~1/RELEASE_X86_64 x86_64 (but issue is not platform-specific)
  • Subsystem: src/node_options.cc

What steps will reproduce the bug?

In #33475, @dfabulich added two new legal values for --unhandled-rejection: throw and warn-with-error-code. These new values are not listed in the help string in node --help. Additionally, the help string doesn't explain which is the default value.

$ node --version
v15.12.0
$ node --help | grep -A4 unhandled-rejections
  --unhandled-rejections=...  define unhandled rejections behavior.
  Options are 'strict' (raise an error),
  'warn' (enforce warnings) or 'none'
  (silence warnings)
  --use-bundled-ca            use bundled CA store (default)
$ node --unhandled-rejections=an-unknown-value -e ''
node: invalid value for --unhandled-rejections
$ node --unhandled-rejections=throw -e ''
$ node --unhandled-rejections=warn-with-error-code -e ''

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior?

The documentation of --unhandled-rejections in --help should list all legal values or not attempt to provide a list of legal values, and it should say what the default value is.

What do you see instead?

Only strict, warn, and none, as shown above.

Additional information

I'd file a PR but I'm not sure I know how to describe the two new values in a concise way. (One option would be to remove the parenthesized explanations and just link to the docs for more details.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions