Skip to content

Commit

Permalink
api: ensure ACL role upsert decode error returns a 400 status code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasell committed Nov 18, 2022
1 parent c495cd9 commit b2ad141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command/agent/acl_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func (s *HTTPServer) aclRoleUpsertRequest(
// Decode the ACL role.
var aclRole structs.ACLRole
if err := decodeBody(req, &aclRole); err != nil {
return nil, CodedError(http.StatusInternalServerError, err.Error())
return nil, CodedError(http.StatusBadRequest, err.Error())
}

// Ensure the request path ID matches the ACL role ID that was decoded.
Expand Down

0 comments on commit b2ad141

Please sign in to comment.