mirror of https://github.com/dapr/go-sdk.git
Return err as nil when replying with DROP status (#349)
Signed-off-by: longshine <longxianghe@gmail.com> Signed-off-by: longshine <longxianghe@gmail.com>
This commit is contained in:
parent
4288f414a6
commit
cae6fc0130
|
@ -150,7 +150,7 @@ func (s *Server) OnTopicEvent(ctx context.Context, in *runtimev1pb.TopicEventReq
|
|||
if retry {
|
||||
return &runtimev1pb.TopicEventResponse{Status: runtimev1pb.TopicEventResponse_RETRY}, err
|
||||
}
|
||||
return &runtimev1pb.TopicEventResponse{Status: runtimev1pb.TopicEventResponse_DROP}, err
|
||||
return &runtimev1pb.TopicEventResponse{Status: runtimev1pb.TopicEventResponse_DROP}, nil
|
||||
}
|
||||
return &runtimev1pb.TopicEventResponse{Status: runtimev1pb.TopicEventResponse_RETRY}, fmt.Errorf(
|
||||
"pub/sub and topic combination not configured: %s/%s",
|
||||
|
|
|
@ -217,7 +217,7 @@ func TestTopicWithErrors(t *testing.T) {
|
|||
PubsubName: sub2.PubsubName,
|
||||
}
|
||||
resp, err := server.OnTopicEvent(ctx, in)
|
||||
assert.Error(t, err)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, resp.GetStatus(), runtime.TopicEventResponse_DROP)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue