[SERVER-542] NullPointerException if PUT /certificate_status does not specify desired_state Created: 2015/04/09 Updated: 2016/05/19 Resolved: 2016/03/09
|Affects Version/s:||SERVER 1.0.8, SERVER 2.0.0|
|Fix Version/s:||SERVER 2.4.0|
|Reporter:||Ruth Linehan||Assignee:||Erik Dasher|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Epic Link:||Server- TBD tickets|
|Sprint:||Server Jade 2016-03-09|
If a PUT request is made to /certificate_status that does not include a desired_state parameter, a null pointer exception gets thrown.
This is an issue in both Puppet Server 1.0.x and Puppet Server 2.0.0 (both stable and master branches of Puppet Server).
|Comment by Kevin Corcoran [ 2016/02/24 ]|
It would be better to return a 400 Bad Request with a message about the missing required parameter in the response body in this case.
|Comment by Justin Stoller [ 2016/03/05 ]|
For QA review purposes, this change affected the logic for when we tell our web routing framework a request is malformed/invalid. The included test is at the service unit level (in process testing passing through the web routing framework).
(That info may not be helpful for the QA review, or it could be incredibly obvious to folks who have been on the team longer than I. Let me know if it is helpful, for now it's at least helpful for me to think about what degree of testing I've put my changes through).