mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
api: ensure ACL role upsert decode error returns a 400 status code. (#15253)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user