Skip to content

Commit 84f6df2

Browse files
Gustavo Chaínjeremyletang
authored andcommitted
Merge pull request #3074 from vegaprotocol/bug/3063
Use stream err instead of ctx.Err
1 parent 3f4abf7 commit 84f6df2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

api/trading_data.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ func (t *tradingDataService) ObserveGovernance(
19481948
if err := stream.Send(resp); err != nil {
19491949
t.log.Error("failed to send governance data into stream",
19501950
logging.Error(err))
1951-
return apiError(codes.Internal, ErrStreamInternal, ctx.Err())
1951+
return apiError(codes.Internal, ErrStreamInternal, err)
19521952
}
19531953
}
19541954
case <-ctx.Done():
@@ -1988,7 +1988,7 @@ func (t *tradingDataService) ObservePartyProposals(
19881988
if err := stream.Send(resp); err != nil {
19891989
t.log.Error("failed to send party proposal into stream",
19901990
logging.Error(err))
1991-
return apiError(codes.Internal, ErrStreamInternal, ctx.Err())
1991+
return apiError(codes.Internal, ErrStreamInternal, err)
19921992
}
19931993
}
19941994
case <-ctx.Done():
@@ -2070,7 +2070,7 @@ func (t *tradingDataService) ObserveProposalVotes(
20702070
if err := stream.Send(resp); err != nil {
20712071
t.log.Error("failed to send proposal vote into stream",
20722072
logging.Error(err))
2073-
return apiError(codes.Internal, ErrStreamInternal, ctx.Err())
2073+
return apiError(codes.Internal, ErrStreamInternal, err)
20742074
}
20752075
}
20762076
case <-ctx.Done():
@@ -2213,7 +2213,7 @@ func (t *tradingDataService) observeEventsWithAck(
22132213
}
22142214
if err := stream.Send(resp); err != nil {
22152215
t.log.Error("Error sending event on stream", logging.Error(err))
2216-
return apiError(codes.Internal, ErrStreamInternal, ctx.Err())
2216+
return apiError(codes.Internal, ErrStreamInternal, err)
22172217
}
22182218
case <-ctx.Done():
22192219
return apiError(codes.Internal, ErrStreamInternal, ctx.Err())

0 commit comments

Comments
 (0)