We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While reviewing #8207, I thought I’d manipulate the calls to POST /v1/job/:job/scale to see what would happen if I passed invalid Count values.
POST /v1/job/:job/scale
Count
With "Count":1.5 the response was:
"Count":1.5
json: cannot unmarshal number 1.5 into Go struct field ScalingRequest.Count of type int64
With "Count":"xyz" the response was:
"Count":"xyz"
json: cannot unmarshal string into Go struct field ScalingRequest.Count of type int64
Both of these responses came with HTTP status 400.
curl 'http://localhost:4300/v1/job/api/scale' \ -H 'content-type: application/json; charset=UTF-8' \ --data-binary '{"Count":"xyz","Reason":"Manual scaling event from the Nomad UI","Target":{"Group":"endpoints"},"Meta":{"Source":"nomad-ui"}}' \
It would be nice from an API consumer perspective for these responses to come as JSON, perhaps status 422?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
While reviewing #8207, I thought I’d manipulate the calls to
POST /v1/job/:job/scale
to see what would happen if I passed invalidCount
values.With
"Count":1.5
the response was:With
"Count":"xyz"
the response was:Both of these responses came with HTTP status 400.
Example cURL
It would be nice from an API consumer perspective for these responses to come as JSON, perhaps status 422?
The text was updated successfully, but these errors were encountered: