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

  1. Check the User JSON body includes all required fields (at minimum a non-empty userId) and no invalid values
  2. Compare your payload against ValueValidator.validateUser rules in web/src/main/java/com/navercorp/pinpoint/web/util and fix the offending field
  3. Ensure the request Content-Type is application/json and the body parses into a User object (a mismatched body can leave fields null)
  4. 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

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


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/1da7ceb9a01bd5a3. Report an issue: GitHub.