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

ignore requests error #1918

Open
yakhira opened this issue Feb 27, 2019 · 10 comments
Open

ignore requests error #1918

yakhira opened this issue Feb 27, 2019 · 10 comments

Comments

@yakhira
Copy link

yakhira commented Feb 27, 2019

Version and environment information:

  1. Newman Version (can be found via newman -v): 4.4.0
  2. OS details (type, version, and architecture): Linux, Mac OS X
  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: tests passed
  6. Command / script used to run Newman: newman run collection.json -e variables.json --verbose
  7. Sample collection, and auxiliary files (minus the sensitive details): N/A
  8. Screenshots (if applicable): N/A

We had issue "retry in case of failure" was suggested to solve it programmatically, but newman fails anyway because of request error, even if we retry it successfully. Is it possible somehow to ignore requests error?

@WinstonJake
Copy link

i have a similar request. Basically, i KNOW that an API will fail for x number of times before it begins working. it retries until it begins working, then the collection continues running.
is there any way i can mute the error? or somehow not report it as a failure at the end of the newman run?

is there any ETA for the same?

@gpabo
Copy link

gpabo commented Mar 9, 2021

+1 for this feature request. We have a use case where the pre-request script retries the request to an endpoint for 'x' number of times until the server is up/ready and continues running the rest of the collection.

This is from following the advice on this post: https://community.postman.com/t/retry-a-failing-request/5934

However, at the end of the collection run, newman returns the result as a failure if a request failed even though a retry was successful and no test cases actually failed.

Is there a way to ignore such an error?

@debu99
Copy link

debu99 commented Feb 18, 2022

any update

@jjduarte
Copy link

jjduarte commented Feb 18, 2022

+1 for this feature request. We have a use case where request to an endpoint sometimes fail with a timeout/ network hiccups (it's very rare) and we have a logic in place to retry it after a few seconds.

Even if one of retries succeed, at the end of the collection run newman returns the result as a failure if a request failed even though a retry was successful and no test cases actually failed.

Screen Shot 2022-02-18 at 5 22 38 PM

It would be nice to have a flag that would allow the exit code to be 0. Something like --ignore-requests-failed or the ability to recognize retried failed requests that succeed.

@elyes-mms
Copy link

Any update?

@sowjanyabodla
Copy link

Any update on this new feature please?

rvijayarajan pushed a commit to rvijayarajan/newman that referenced this issue Feb 9, 2023
Feature request: postmanlabs#1918
Introduced a new command line argument named supressRequestErrors to
newman cli. The new argument will receive a array of domain names to
be ignored of their errors (DNS lookup errors). The Run Summary
instance will suppress the errors if the errored url / domain is
supplied by the user in this argument.
@sowjanyabodla
Copy link

Hello,
Would it be possible to review the fix and do a merge please?
Thanks

@rvijayarajan
Copy link

Hello,

Can someone review the PR and merge it please?

#3066

Thanks,

@sindilevich
Copy link

Having Newman fail the final result because of requests falling on some network issues is a real dealbreaker. Could the maintainer please review @rvijayarajan PR? Releasing a version with a flag that marks request network hiccups as non-breaking is greatly anticipated.
Thank you in advance!

@pavelshaforostov
Copy link

Hi!
Having this will be a really useful option.
Could someone review @rvijayarajan request?

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

No branches or pull requests