Skip to content

Commit

Permalink
Fixed superfluous bug (#619)
Browse files Browse the repository at this point in the history
Signed-off-by: Gowtham H N <[email protected]>
  • Loading branch information
GowthamHN authored Oct 28, 2024
1 parent f9baae2 commit a074ea7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions service/http/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand All @@ -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)
}
Expand Down

0 comments on commit a074ea7

Please sign in to comment.