Done
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Paweł Albecki
Paweł Albecki(Deactivated)Reporter
Ben Leibert
Ben LeibertStory Points
1
Original estimate
1h
Time tracking
Components
Sprint
None
Fix versions
Affects versions
Priority
Time Assistant
Time Assistant
Created February 24, 2017 at 5:36 AM
Updated March 15, 2017 at 2:12 PM
Resolved March 9, 2017 at 1:26 PM
The implementation of PUT /facilities/{id} includes this line of code:
boolean addSuccessful = addSupportedProgramsToFacility(facilityDto.getSupportedPrograms(), facilityToSave);
This line fails when clients provide a request body which lacks an array of supportedPrograms. For example, this request body will cause a NullPointerException at the aforementioned line:
{
"id": "e6799d64-d10d-4011-b8c2-0e4d4a3f65ce",
"active": true
}
This ticket may be considered complete when the NullPointerException is no longer thrown. The "putShouldReturnBadRequestForNonExistentSupportedProgram" test suggests that a 400 error should instead be returned by throwing a ValidationMessageException with a key/message describing the validation exception.