You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when attempting to modify an ACL policy with invalid rules syntax, you will receive a 404 instead of a more appropriate status code like 400 or something.
Reproduction steps
create a an ACL policy, then retreive it to confirm it's presence:
http -v 127.0.0.1:4646/v1/acl/policy/gbolo-test Name=gbolo-test rules=bar 'X-Nomad-Token:<redacted>'
POST /v1/acl/policy/gbolo-test HTTP/1.1
...
{
"Name": "gbolo-test",
"rules": "invalid"
}
HTTP/1.1 404 Not Found
Content-Encoding: gzip
Content-Length: 150
Date: Tue, 31 Jan 2023 18:00:24 GMT
Vary: Accept-Encoding
policy 0 invalid: 1 error occurred:
* failed to parse rules: Failed to parse ACL Policy: At 1:9: key 'invalid' expected start of object ('{') or assignment ('=')
Expected Result
Not sure if this was intentional or not, just opening an issue in case this was not the desired behaviour. I couldn't find any mention about the expected response in the documentation, its just completely missing.
Judging by the output, it looks like the server is aware that the client sent invalid input, so perhaps changing the status code won't be too difficult? Feel free to close this issue if this is the expected behaviour.
The text was updated successfully, but these errors were encountered:
Nomad version
Nomad v1.4.3 (f464aca721d222ae9c1f3df643b3c3aaa20e2da7)
Issue
when attempting to modify an ACL policy with invalid rules syntax, you will receive a
404
instead of a more appropriate status code like400
or something.Reproduction steps
create a an ACL policy, then retreive it to confirm it's presence:
Then try to modify it with invalid rules:
Expected Result
Not sure if this was intentional or not, just opening an issue in case this was not the desired behaviour. I couldn't find any mention about the expected response in the documentation, its just completely missing.
Judging by the output, it looks like the server is aware that the client sent invalid input, so perhaps changing the status code won't be too difficult? Feel free to close this issue if this is the expected behaviour.
The text was updated successfully, but these errors were encountered: