Skip to content

Commit d5e03f2

Browse files
jeanp413roboquat
authored andcommitted
Handle send error
1 parent 5243e98 commit d5e03f2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/public-api-server/pkg/apiv1/workspace.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,15 @@ func (s *WorkspaceService) StreamWorkspaceStatus(ctx context.Context, req *conne
113113
logger.WithError(err).Error("Failed to convert workspace instance.")
114114
return proxy.ConvertError(err)
115115
}
116-
_ = stream.Send(&v1.StreamWorkspaceStatusResponse{
116+
err = stream.Send(&v1.StreamWorkspaceStatusResponse{
117117
Result: &v1.WorkspaceStatus{
118118
Instance: instance,
119119
},
120120
})
121+
if err != nil {
122+
logger.WithError(err).Error("Failed to stream workspace status.")
123+
return proxy.ConvertError(err)
124+
}
121125
}
122126

123127
return nil

0 commit comments

Comments
 (0)