Skip to content

Commit

Permalink
Send TApplicationException to client if raised
Browse files Browse the repository at this point in the history
  • Loading branch information
aisk committed Jan 15, 2021
1 parent 17a66b5 commit 77529d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thriftpy2/thrift.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ def process(self, iprot, oprot):

try:
result.success = call()
except TApplicationException as e:
return self.send_exception(oprot, api, e, seqid)
except Exception as e:
# raise if api don't have throws
if not self.handle_exception(e, result):
Expand Down

0 comments on commit 77529d2

Please sign in to comment.