Skip to content

Commit

Permalink
Fixed superfluous bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GowthamHN committed Aug 19, 2024
1 parent 9bc7d82 commit 600557f
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 600557f

Please sign in to comment.