jrasell / sherpa

Sherpa is a highly available, fast, and flexible horizontal job scaling for HashiCorp Nomad. It is capable of running in a number of different modes to suit different requirements, and can scale based on Nomad resource metrics or external sources.
Mozilla Public License 2.0
163 stars 8 forks source link

Incorrect response code and error when API scaling breaks limits #59

Closed jrasell closed 4 years ago

jrasell commented 4 years ago

Describe the bug When attempting to scale a job by a count which will break the configured policy thresholds, the returned error is empty and the response code is 304. The error should include details of what problem occurred. The response code should be 403, to indicate the request contained valid parameters, but was rejected by the server.

pmcatominey commented 4 years ago

My suggestion for this would be to use 409 or 412 to avoid any confusion with auth with is where 403 is most commonly used.

jrasell commented 4 years ago

good shout @pmcatominey