From 352c372a1f234faf466024d0e77488824a836c41 Mon Sep 17 00:00:00 2001 From: Gowtham H N <44719307+GowthamHN@users.noreply.github.com> Date: Mon, 19 Aug 2024 23:03:12 +0530 Subject: [PATCH] Fixed superfluous bug Signed-off-by: Gowtham H N <44719307+GowthamHN@users.noreply.github.com> --- service/http/topic.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/service/http/topic.go b/service/http/topic.go index 9e04eaa6..8cb87a69 100644 --- a/service/http/topic.go +++ b/service/http/topic.go @@ -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) }