File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
routers/api/v1/activitypub Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
11
11
"code.gitea.io/gitea/modules/activitypub"
12
12
"code.gitea.io/gitea/modules/context"
13
13
"code.gitea.io/gitea/modules/json"
14
+ "code.gitea.io/gitea/modules/log"
14
15
"code.gitea.io/gitea/modules/setting"
15
16
"code.gitea.io/gitea/routers/api/v1/user"
16
17
@@ -95,8 +96,13 @@ func Person(ctx *context.APIContext) {
95
96
96
97
ctx .Resp .Header ().Add ("Content-Type" , "application/activity+json" )
97
98
ctx .Resp .WriteHeader (http .StatusOK )
98
- binary , _ = json .Marshal (jsonmap )
99
- ctx .Resp .Write (binary )
99
+ binary , err = json .Marshal (jsonmap )
100
+ if err != nil {
101
+ ctx .Error (http .StatusInternalServerError , "Marshal" , err )
102
+ }
103
+ if _ , err = ctx .Resp .Write (binary ); err != nil {
104
+ log .Error ("write to resp err: %v" , err )
105
+ }
100
106
}
101
107
102
108
// PersonInbox function
You can’t perform that action at this time.
0 commit comments