From d06772b3765571c01be8b6e9eff91ceb84adb6f8 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Tue, 14 Jun 2022 12:26:06 -0500 Subject: [PATCH] Return if marshalling error --- routers/api/v1/activitypub/person.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routers/api/v1/activitypub/person.go b/routers/api/v1/activitypub/person.go index 9b18dc118b..663493312f 100644 --- a/routers/api/v1/activitypub/person.go +++ b/routers/api/v1/activitypub/person.go @@ -93,6 +93,7 @@ func Person(ctx *context.APIContext) { binary, err = json.Marshal(jsonmap) if err != nil { ctx.Error(http.StatusInternalServerError, "Marshal", err) + return } if _, err = ctx.Resp.Write(binary); err != nil { log.Error("write to resp err: %v", err)