From 116d65a02222d53f511ef82dcec1e9a6cb1ccf37 Mon Sep 17 00:00:00 2001 From: Samantha Coyle Date: Fri, 8 Sep 2023 14:17:55 -0500 Subject: [PATCH 1/2] fix: rm superfluous header Signed-off-by: Samantha Coyle --- service/http/topic.go | 1 - 1 file changed, 1 deletion(-) diff --git a/service/http/topic.go b/service/http/topic.go index 74376a89..8fba537b 100644 --- a/service/http/topic.go +++ b/service/http/topic.go @@ -196,7 +196,6 @@ func (s *Server) registerBaseHandler() { if err != actorErr.Success { w.WriteHeader(http.StatusInternalServerError) } - w.WriteHeader(http.StatusOK) } s.mux.Put("/actors/{actorType}/{actorId}/method/remind/{reminderName}", fReminder) From 0c6cce8f4f001b303f03d25dea0a4852a06c1fcf Mon Sep 17 00:00:00 2001 From: Samantha Coyle Date: Fri, 15 Sep 2023 15:08:10 -0500 Subject: [PATCH 2/2] fix: add returns Signed-off-by: Samantha Coyle --- service/http/topic.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/service/http/topic.go b/service/http/topic.go index 8fba537b..17b7738d 100644 --- a/service/http/topic.go +++ b/service/http/topic.go @@ -175,9 +175,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) } @@ -192,11 +194,15 @@ 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) } + s.mux.Put("/actors/{actorType}/{actorId}/method/remind/{reminderName}", fReminder) // register actor timer invoke handler @@ -208,9 +214,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) }