Merge pull request #330 from madhawap/master

fixes to role updating endpoint
4.x.x
Dilan U. Ariyaratne 8 years ago committed by GitHub
commit 74f273dea4

@ -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…
Cancel
Save