Added decorator to produce structured response

@czue 
http://manage.dimagi.com/default.asp?131002
This should say `unicode(e)` instead of `e.message`.