-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add log if ES is unreachable #1315
Conversation
6ba729f
to
9342c20
Compare
Wouldn't the exception eventually make it all the way to the top-level and cause Rails to dump a backtrace to the log (and a 500 to the user)? But if we're not logging it currently, I'm not at all opposed to doing so. We don't keep the logs themselves for very long, and there's far too much volume to probably want to keep them all. But every once in a while capture a snapshot with |
but do we want to provide 500 for the user? |
What should we provide? The only other obvious answer is an empty search result, but I wonder if a 500 makes more sense from the point of caching (i.e., it really is a server error, and if they try again in a minute they're going to get a different answer). I doubt it matters much in practice, though. |
sure, I can make the exception bubble up. Will do that this weekend probably |
it seems some tests broke. will need to take care of that |
finally got some time to look into the failing tests, and I'm not sure of the best approach:
but this will return But if I add I'm pretty sure I'm doing some rails-noob mistake here. Any hints @peff / @tarebyte ? |
If ES is down, we were swallowing the exception. Now we at least log it as an error. Not sure if we have warnings at heroku level (@peff ), but if we don't, it won't hurt
closes #1001