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

Don't throw on connection failure if ThrowOnPostFail is false #25

Open
bretcope opened this issue Jul 25, 2016 · 2 comments
Open

Don't throw on connection failure if ThrowOnPostFail is false #25

bretcope opened this issue Jul 25, 2016 · 2 comments

Comments

@bretcope
Copy link
Contributor

Right now, ThrowOnPostFail only applies to >= 500 status codes, but it should also apply if the connection is unavailable.

@wilson85
Copy link

Looking at the code, you can set a handler which will stop it from throwing.

MetricsCollector.OnBackgroundException +=

@bretcope
Copy link
Contributor Author

@wilson85 those are orthogonal. The background exception handler catches anything that throws and sends it somewhere that won't crash the background thread (and potentially the process). The ThrowOnPostFails deals with whether an exception gets sent anywhere (regardless of whether it's truly thrown or sent to the exception handler).

It should probably be renamed to TreatPostFailAsError or something like that in the future to make it less confusing.

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

2 participants