flowable/flowable-engine · error · FlowableIllegalArgumentException
The key cannot be null.
Error message
The key cannot be null.
What it means
REST request validation in UserInfoCollectionResource.setUserInfo: a user-info entry was submitted without a key. Info entries are key/value pairs addressed by key, so a missing key makes the request unprocessible.
Solutions
- Include a non-null 'key' field in the request JSON
- Validate the payload client-side before the call
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/identity/UserInfoCollectionResource.java:78 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/e04fad4f56c0fbaf.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/identity/UserInfoCollectionResource.java:78
return restResponseFactory.createUserInfoKeysResponse(identityService.getUserInfoKeys(user.getId()), user.getId());
}
@ApiOperation(value = "Create a new user’s info entry", tags = { "Users" }, nickname = "createUserInfo", code = 201)
@ApiResponses(value = {
@ApiResponse(code = 201, message = "Indicates the user was found and the info has been created."),
@ApiResponse(code = 400, message = "Indicates the key or value was missing from the request body. Status description contains additional information about the error."),
@ApiResponse(code = 404, message = "Indicates the requested user was not found."),
@ApiResponse(code = 409, message = "Indicates there is already an info-entry with the given key for the user, update the resource instance (PUT).")
})
@PostMapping(value = "/identity/users/{userId}/info", produces = "application/json")
@ResponseStatus(HttpStatus.CREATED)
public UserInfoResponse setUserInfo(@ApiParam(name = "userId") @PathVariable String userId, @RequestBody UserInfoRequest userRequest) {
User user = getUserFromRequest(userId);
if (userRequest.getKey() == null) {
throw new FlowableIllegalArgumentException("The key cannot be null.");
}
if (userRequest.getValue() == null) {
throw new FlowableIllegalArgumentException("The value cannot be null.");
}
String existingValue = identityService.getUserInfo(user.getId(), userRequest.getKey());
if (existingValue != null) {
throw new FlowableConflictException("User info with key '" + userRequest.getKey() + "' already exists for this user.");
}
identityService.setUserInfo(user.getId(), userRequest.getKey(), userRequest.getValue());
return restResponseFactory.createUserInfoResponse(userRequest.getKey(), userRequest.getValue(), user.getId());
}
}
View on GitHub (pinned to d6d39ce1c6)