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

Rescue from connection refused errors and return the appropriate status code #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewhavens
Copy link

When the app that is being proxied is not running, the code currently returns an exception. This prevents the exception and returns the appropriate status code.

@waterlink
Copy link
Owner

@andrewhavens Great work here! How do you plan to test this feature?

@andrewhavens
Copy link
Author

@waterlink hmm...I'm not sure. I can't remember exactly how it's triggered. Somewhere in Rack I think. I suppose we could mock the error. What do you think?

@waterlink
Copy link
Owner

@andrewhavens We could try to use webmock and raise the error inside of the stub_request block. It might do the trick.

Also, I have noticed that the error connection refused handling is in the method. It would totally do the trick. What do you think, is there a more suitable place to put this error handling in?

@jjb jjb mentioned this pull request Feb 27, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants