From 46591ec54d222763adf76ace2f1ab76fa0cdfaec Mon Sep 17 00:00:00 2001 From: Chris Capurso <1036769+ccapurso@users.noreply.github.com> Date: Mon, 18 Apr 2022 15:45:08 -0400 Subject: [PATCH] sort list of unrecognized params in response warning (#15073) --- sdk/framework/backend.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/framework/backend.go b/sdk/framework/backend.go index 481c6907b..28071e5ac 100644 --- a/sdk/framework/backend.go +++ b/sdk/framework/backend.go @@ -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)) }