Permalink
Browse files

Catch TypeError when calling handler

  • Loading branch information...
labisso committed Dec 17, 2011
1 parent a98a76a commit 7d84e77a389da6a1d567906e2d9de9b5c514bc23
Showing with 3 additions and 0 deletions.
  1. +3 −0 dashi/__init__.py
View
@@ -238,6 +238,9 @@ def _callback(self, body, message):
try:
ret = op_fun(**args)
+ except TypeError, e:
+ log.exception("Type error with handler for %s:%s", self._name, op)
+ raise BadRequestError("Type error: %s" % str(e))
except Exception:
log.exception("Error in handler for %s:%s", self._name, op)
raise

0 comments on commit 7d84e77

Please sign in to comment.