api/v1: return error more clear and common. (#2050)
Signed-off-by: johncming <johncming@yahoo.com>
This commit is contained in:
parent
311650658a
commit
5ef70697a7
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue