sort list of unrecognized params in response warning (#15073)
This commit is contained in:
parent
106ea2a2de
commit
46591ec54d
|
@ -295,6 +295,8 @@ func (b *Backend) HandleRequest(ctx context.Context, req *logical.Request) (*log
|
|||
// If fields supplied in the request are not present in the field schema
|
||||
// of the path, add a warning to the response indicating that those
|
||||
// parameters will be ignored.
|
||||
sort.Strings(ignored)
|
||||
|
||||
if len(ignored) != 0 {
|
||||
resp.AddWarning(fmt.Sprintf("Endpoint ignored these unrecognized parameters: %v", ignored))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue