Skip to content

Conversation

@maretskiy
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.4%) to 91.364% when pulling 0a6c5d9 on fix-issue-14 into 726671b on master.



def get_elasticsearch(check_availability=False):
"""Return Elasticsearch instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method must raise Exception. It's very important.

Code that is using this method should handle exception

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@coveralls
Copy link

Coverage Status

Coverage increased (+1.5%) to 91.518% when pulling c050c96 on fix-issue-14 into 726671b on master.

mesg = ("Failed to query Elasticsearch nodes %s: %s"
% (nodes, str(e)))
LOG.error(mesg)
raise StorageException(mesg)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like ExceptionSpoofing antipattern

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.

5 participants