Skip to content

Commit

Permalink
Neuter a TODO that isn't really a TODO.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikrose committed Mar 19, 2013
1 parent bd42d2c commit 56f7787
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pyelasticsearch/exceptions.py
Expand Up @@ -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.
Expand Down

0 comments on commit 56f7787

Please sign in to comment.