mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
fixes to role updating endpoint
This commit is contained in:
parent
9fde8c0442
commit
c6cc5e8df3
@ -309,8 +309,12 @@ public class RequestValidationUtil {
|
|||||||
public static void validateRoleDetails(RoleInfo roleInfo) {
|
public static void validateRoleDetails(RoleInfo roleInfo) {
|
||||||
if (roleInfo == null) {
|
if (roleInfo == null) {
|
||||||
throw new InputValidationException(
|
throw new InputValidationException(
|
||||||
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request body is incorrect or" +
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request body is "
|
||||||
" empty").build());
|
+ "empty").build());
|
||||||
|
} else if (roleInfo.getRoleName() == null) {
|
||||||
|
throw new InputValidationException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request body is "
|
||||||
|
+ "incorrect").build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user