Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error output for failed reporter loading #3126

Open
tillig opened this issue Jul 11, 2023 · 0 comments
Open

Improve error output for failed reporter loading #3126

tillig opened this issue Jul 11, 2023 · 0 comments

Comments

@tillig
Copy link

tillig commented Jul 11, 2023

  1. Newman Version (can be found via newman -v): 5.3.2
  2. OS details (type, version, and architecture): node-18:alpine container
  3. Are you using Newman as a library, or via the CLI? CLI
  4. Did you encounter this recently, or has this bug always been there: Always
  5. Expected behaviour: Ability to view errors if a reporter doesn't load.
  6. Command / script used to run Newman: N/A
  7. Sample collection, and auxiliary files (minus the sensitive details): N/A
  8. Screenshots (if applicable): N/A

Right now, the run/index.js has a TODO to output errors encountered during the loading of a reporter. Without this information, problems get hidden, like if you update a reporter's dependency and the dependency doesn't load right. It's not that the reporter isn't found, it's that there was a problem with a transitive dependency.

The TODO indicates perhaps a verbose/debug mode might be a way to tap into this.

I know there's a --verbose option that enables more timings, etc. to be output - would it be OK to also do a console.warn with the full error details if --verbose is specified?

I'd be happy to submit a PR for this if that is a reasonable option, but I won't waste time on it if it's not interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant