mirror of https://github.com/dapr/go-sdk.git
Fixed superfluous bug (#619)
Signed-off-by: Gowtham H N <44719307+GowthamHN@users.noreply.github.com>
This commit is contained in:
parent
f9baae2539
commit
a074ea7428
|
|
@ -190,9 +190,11 @@ func (s *Server) registerBaseHandler() {
|
|||
err := runtime.GetActorRuntimeInstanceContext().Deactivate(r.Context(), actorType, actorID)
|
||||
if err == actorErr.ErrActorTypeNotFound || err == actorErr.ErrActorIDNotFound {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
if err != actorErr.Success {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
|
@ -207,9 +209,11 @@ func (s *Server) registerBaseHandler() {
|
|||
err := runtime.GetActorRuntimeInstanceContext().InvokeReminder(r.Context(), actorType, actorID, reminderName, reqData)
|
||||
if err == actorErr.ErrActorTypeNotFound {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
if err != actorErr.Success {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
|
@ -224,9 +228,11 @@ func (s *Server) registerBaseHandler() {
|
|||
err := runtime.GetActorRuntimeInstanceContext().InvokeTimer(r.Context(), actorType, actorID, timerName, reqData)
|
||||
if err == actorErr.ErrActorTypeNotFound {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
if err != actorErr.Success {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue