diff --git a/users/api/transport.go b/users/api/transport.go index 3716f4a1..bb59d495 100644 --- a/users/api/transport.go +++ b/users/api/transport.go @@ -132,17 +132,14 @@ func decodeViewProfile(_ context.Context, r *http.Request) (interface{}, error) func decodeListUsers(_ context.Context, r *http.Request) (interface{}, error) { o, err := httputil.ReadUintQuery(r, offsetKey, defOffset) - if err != nil && err != errors.ErrNotFoundParam { + if err != nil { return nil, err } l, err := httputil.ReadUintQuery(r, limitKey, defLimit) - if err != nil && err != errors.ErrNotFoundParam { + if err != nil { return nil, err } - if err == errors.ErrNotFoundParam { - l = defLimit - } e, err := httputil.ReadStringQuery(r, emailKey, "") if err != nil { @@ -232,17 +229,14 @@ func decodePasswordChange(_ context.Context, r *http.Request) (interface{}, erro func decodeListMembersRequest(_ context.Context, r *http.Request) (interface{}, error) { o, err := httputil.ReadUintQuery(r, offsetKey, defOffset) - if err != nil && err != errors.ErrNotFoundParam { + if err != nil { return nil, err } l, err := httputil.ReadUintQuery(r, limitKey, defLimit) - if err != nil && err != errors.ErrNotFoundParam { + if err != nil { return nil, err } - if err == errors.ErrNotFoundParam { - l = defLimit - } m, err := httputil.ReadMetadataQuery(r, metadataKey, nil) if err != nil {