Skip to content

Commit

Permalink
thrift: Handle unexpected errors in handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav committed May 26, 2016
1 parent 0800538 commit fbac9e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions encoding/thrift/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func (t thriftHandler) Handle(ctx context.Context, treq *transport.Request, rw t
Headers: treq.Headers,
TTL: treq.TTL,
}, reqBody)
if err != nil {
return err
}

if response != nil {
rw.AddHeaders(response.Headers)
Expand Down

0 comments on commit fbac9e4

Please sign in to comment.