docs: public static <T extends ConstraintViolation<?>> int determineStatus(Set<T> violations, Invocable invocable) {
          if (violations.size() > 0) {
              final ConstraintViolation<?> violation = violations.iterator().next();
              for (Path.Node node : violation.getPropertyPath()) {
                  switch (node.getKind()) {
                      case RETURN_VALUE:
                          return 500;
                      case PARAMETER:
                          // Now determine if the parameter is the request entity
                          final int index = node.as(Path.ParameterNode.class).getParameterIndex();
                          final Parameter parameter = invocable.getParameters().get(index);
                          return parameter.getSource().equals(Parameter.Source.UNKNOWN) ? 422 : 400;
                      default:
                          continue;
                  }
              }
          }
  
          // This shouldn't hit, but if it does, we'll return a unprocessable entity
          return 422;
      }