Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Neuter a TODO that isn't really a TODO.

  • Loading branch information...
commit 56f7787a9164ceb21853ef9ffbc17c5e464c7b31 1 parent bd42d2c
@erikrose erikrose authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 pyelasticsearch/exceptions.py
View
12 pyelasticsearch/exceptions.py
@@ -3,12 +3,12 @@
class ElasticHttpError(Exception):
"""Exception raised when ES returns a non-OK (>=400) HTTP status code"""
- # TODO: If helpful in practice, split this into separate subclasses for 4xx
- # and 5xx errors. On second thought, ES, as of 0.19.9, returns 500s on
- # trivial things like JSON parse errors (which it does recognize), so it
- # wouldn't be good to rely on its idea of what's a client error and what's
- # a server error. We'd have to test the string for what kind of error it is
- # and choose an exception class accordingly.
+ # We can't just split this into separate subclasses for 4xx and 5xx errors.
+ # ES, as of 0.19.9, returns 500s on trivial things like JSON parse errors
+ # (which it does recognize), so it wouldn't be good to rely on its idea of
+ # what's a client error and what's a server error. We have to test the
+ # string for what kind of error it is and choose an exception class
+ # accordingly.
# This @property technique allows the exception to be pickled (like by
# Sentry or celery) without having to write our own serialization stuff.
Please sign in to comment.
Something went wrong with that request. Please try again.