1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-02 01:15:48 +00:00

Return if marshalling error

This commit is contained in:
Anthony Wang 2022-06-14 12:26:06 -05:00
parent faf2855244
commit d06772b376
No known key found for this signature in database
GPG Key ID: BC96B00AEC5F2D76

View File

@ -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)