mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
fix related to http status code in 'getDevices' endpoint
This commit is contained in:
parent
a9f8e8c84d
commit
f2ab923df5
@ -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…
Reference in New Issue
Block a user