pinpoint-apm/pinpoint · error · ResponseStatusException
User information validation failed to creating user informat
Error message
User information validation failed to creating user information.
What it means
Pinpoint's UserController rejects a POST /user request when the submitted User object fails ValueValidator.validateUser, throwing a 400 ResponseStatusException. The validator enforces required/shape rules (e.g. valid userId, name, etc.) before any user record is created. No user is inserted when this fires.
Source
Thrown at web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/UserController.java:64
@RestController
@RequestMapping("/api/user")
@Validated
public class UserController {
private final Logger logger = LogManager.getLogger(this.getClass());
public final static String USER_ID = "userid";
private final UserService userService;
public UserController(UserService userService) {
this.userService = Objects.requireNonNull(userService, "userService");
}
@PreAuthorize("hasPermission(null, null, T(com.navercorp.pinpoint.web.security.PermissionChecker).PERMISSION_ADMINISTRATION_EDIT_USER)")
@PostMapping
public Response insertUser(@RequestBody User user) {
if (!ValueValidator.validateUser(user)) {
throw new ResponseStatusException(
HttpStatus.BAD_REQUEST,
"User information validation failed to creating user information."
);
}
userService.insertUser(user);
return SimpleResponse.ok();
}
@PreAuthorize("hasPermission(null, null, T(com.navercorp.pinpoint.web.security.PermissionChecker).PERMISSION_ADMINISTRATION_EDIT_USER)")
@DeleteMapping
public Response deleteUser(@RequestBody User user) {
if (StringUtils.isEmpty(user.getUserId())) {
throw new ResponseStatusException(
HttpStatus.BAD_REQUEST,
"there is not userId in params to delete user"
);
}
userService.deleteUser(user.getUserId());View on GitHub (pinned to 744c3d3075)
Solutions
- Check the User JSON body includes all required fields (at minimum a non-empty userId) and no invalid values
- Compare your payload against ValueValidator.validateUser rules in web/src/main/java/com/navercorp/pinpoint/web/util and fix the offending field
- Ensure the request Content-Type is application/json and the body parses into a User object (a mismatched body can leave fields null)
- Call GET /user to confirm the user doesn't already exist in a conflicting state
Example fix
// before
curl -X POST /user -d '{"name":"alice"}'
// after
curl -X POST /user -H 'Content-Type: application/json' -d '{"userId":"alice","name":"Alice","department":"dev"}' Defensive patterns
Strategy: validation
Validate before calling
// Java/JS check before POST /user
function isValidUser(u) {
return !!u && typeof u.userId === 'string' && u.userId.length > 0 &&
typeof u.name === 'string' && u.name.length > 0;
}
if (!isValidUser(payload)) throw new Error('User validation failed client-side'); Type guard
function isUser(u) {
return typeof u === 'object' && u !== null && typeof u.userId === 'string';
} Try / catch
try {
await axios.post('/user', payload);
} catch (e) {
if (e.response && e.response.status === 400) {
console.error('User validation failed:', e.response.data);
}
throw e;
} Prevention
- Validate required User fields (userId, name) against ValueValidator rules before calling the API
- Use a typed client/DTO so missing fields are caught at compile time
- Send Content-Type: application/json
- Check for existing users via GET /user before creating
When it happens
Trigger: POST /user (admin-only endpoint) with a JSON body missing or containing invalid User fields (e.g. blank userId, malformed name/email/phone/department) so ValueValidator.validateUser returns false.
Common situations: Hand-crafted admin scripts or curl calls omitting required fields; UI forms submitted with empty userId; API upgrades where User field rules changed; automation posting users with null instead of empty strings.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- No service type provided.
- there is not userId in params to delete user
- Invalid serviceTypeCode
- Missing argument: webhook.id
- Missing arguments: webhook.id, webhook.url, applicationId/se
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/1da7ceb9a01bd5a3.
Report an issue: GitHub.