api/v1: return error more clear and common. (#2050)

Signed-off-by: johncming <johncming@yahoo.com>
This commit is contained in:
johncming 2019-09-27 16:05:09 +08:00 committed by Simon Pasquier
parent 311650658a
commit 5ef70697a7

View File

@ -791,6 +791,7 @@ func (api *API) receive(r *http.Request, v interface{}) error {
err := dec.Decode(v)
if err != nil {
level.Debug(api.logger).Log("msg", "Decoding request failed", "err", err)
return err
}
return err
return nil
}