Merge pull request #2111 from zhulongcheng/fix-json-decode-500
fix(http): return http 400 if request data is invalidpull/10616/head
commit
088cf6e98e
|
@ -311,7 +311,8 @@ func decodePatchViewRequest(ctx context.Context, r *http.Request) (*patchViewReq
|
|||
upd := platform.ViewUpdate{}
|
||||
if err := json.NewDecoder(r.Body).Decode(&upd); err != nil {
|
||||
return nil, &platform.Error{
|
||||
Err: err,
|
||||
Code: platform.EInvalid,
|
||||
Err: err,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue