Merge pull request #302 from madhawap/rest-api-improvements

fix related to http status code in 'getDevices' endpoint
4.x.x
Dilan U. Ariyaratne 9 years ago committed by GitHub
commit 796ba65ec1

@ -127,7 +127,8 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
}
} else {
result = dms.getAllDevices(request);
if (result == null) {
int resultCount = result.getRecordsTotal();
if (resultCount == 0) {
throw new NotFoundException(
new ErrorResponse.ErrorResponseBuilder().setCode(404l).setMessage("No device is currently" +
" enrolled with the server").build());

Loading…
Cancel
Save