Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Issue 90. Nix silly exception "handling"

The problem here is that it's logging as an error and then re-raising.
That's kind of irritating. It's better to just let it propagate back
to the application and let it do whatever it wants to do.

Amongst other things, this is less spammy with sentry.
  • Loading branch information...
commit 714a5c95ad479ed913c27de86a6a1f58a0a1a58a 1 parent ccff9b2
Will Kahn-Greene willkg authored
Showing with 6 additions and 11 deletions.
  1. +6 −11 elasticutils/__init__.py
17 elasticutils/__init__.py
View
@@ -694,11 +694,9 @@ def raw(self):
"""
qs = self._build_query()
es = self.get_es()
- try:
- hits = es.search(qs, self.get_indexes(), self.get_doctypes())
- except Exception:
- log.error(qs)
- raise
+
+ hits = es.search(qs, self.get_indexes(), self.get_doctypes())
+
log.debug('[%s] %s' % (hits['took'], qs))
return hits
@@ -825,12 +823,9 @@ def raw(self):
if self.s:
kwargs['body'] = self.s._build_query()
- try:
- hits = es._send_request('GET', path, **kwargs)
- log.debug(hits)
- except Exception:
- log.error(kwargs)
- raise
+ hits = es._send_request('GET', path, **kwargs)
+ log.debug(hits)
+
log.debug('[%s] %s' % (hits['took'], kwargs))
return hits
Please sign in to comment.
Something went wrong with that request. Please try again.