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

Questions about catch_es_error decorator's status code and response body #74

Closed
acrewdson opened this issue May 22, 2018 · 1 comment
Closed

Comments

@acrewdson
Copy link

When doing some testing against a cf.gov environment that could not talk to Elasticsearch, I saw the following error at /data-research/consumer-complaints/search/api/v1/?field=all&size=25&sort=created_date_desc:

Elasticsearch error: <urllib3.connection.HTTPConnection object at 0x7f5558fef650>: Failed to establish a new connection: [Errno 111] Connection refused

This was in a non-debug environment where I would not expect to see a raw exception leaking into a response like that. I thought I'd open an issue in case this is something that could be adjusted.

I'm also wondering if a 400 (see here) is appropriate in this scenario, since it seems more like a 500 situation to me.

@JeffreyMFarley
Copy link
Contributor

In the internal version we change the code to be 424 - Failed Dependency

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

3 participants