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

Store history of last N errors and api to get last error or all history #45

Open
kanekv opened this issue Apr 11, 2017 · 3 comments
Open

Comments

@kanekv
Copy link

kanekv commented Apr 11, 2017

We want to use circuit breaker instance in our healthcheck reporting. Would be nice if cb instance was able to report which errors triggered it to fail.
If that's something you consider useful for this library we can send a PR.

@rubyist
Copy link
Owner

rubyist commented Apr 11, 2017

That sounds cool, I'd definitely take a PR for it. 👍

@kanekv
Copy link
Author

kanekv commented Apr 11, 2017

so we envision a couple of additional api methods, it will stay compatible:
FailWithError(error)
Error() error - return last error
Errors() []error - return history of errors

I'm not sure yet how we configure history depth. Do you have any suggestions?

@kanekv
Copy link
Author

kanekv commented Apr 13, 2017

@rubyist I've submitted PR, let me know what you think. Thanks!

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