Skip to content

Commit

Permalink
add errros to ReqCtx
Browse files Browse the repository at this point in the history
  • Loading branch information
ppwfx committed May 11, 2020
1 parent 96f0a9f commit bfa7774
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions metamate/pkg/v0/business/funcs/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,14 @@ func HandleSvcReq(hs map[bool]map[string]types.RequestHandler) types.FuncTransfo
return ctx
}

gErrs, ok := ctx.GSvcRsp.GenericSlice(fieldnames.Errors)
if ok {
var errs []sdk.Error
gErrs.MustToStructs(&errs)

ctx.Errs = append(ctx.Errs, errs...)
}

return ctx
}(ctx)

Expand Down

0 comments on commit bfa7774

Please sign in to comment.