Netflix/Hystrix · error · IllegalArgumentException

bad property value. property name '{}'. Expected int value,

Error message

bad property value. property name '{}'. Expected int value, actual = {}

What it means

toInt() is the value-conversion helper used by HystrixPropertiesManager when a @HystrixProperty is bound to an int-typed setter (timeouts, window sizes, concurrency counts). If Integer.parseInt fails with NumberFormatException it rethrows IllegalArgumentException with the property name, the expected type, and the actual string so you can see exactly which value is malformed.

Source

Thrown at hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/conf/HystrixPropertiesManager.java:415

    private interface PropSetter<S, V> {
        void set(S setter, V value) throws IllegalArgumentException;
    }

    private static <E extends Enum<E>> E toEnum(String propName, String propValue, Class<E> enumType, E... values) throws IllegalArgumentException {
        try {
            return Enum.valueOf(enumType, propValue);
        } catch (NullPointerException npe) {
            throw createBadEnumError(propName, propValue, values);
        } catch (IllegalArgumentException e) {
            throw createBadEnumError(propName, propValue, values);
        }
    }

    private static int toInt(String propName, String propValue) throws IllegalArgumentException {
        try {
            return Integer.parseInt(propValue);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException("bad property value. property name '" + propName + "'. Expected int value, actual = " + propValue);
        }
    }

    private static boolean toBoolean(String propValue) {
        return Boolean.valueOf(propValue);
    }

    private static IllegalArgumentException createBadEnumError(String propName, String propValue, Enum... values) {
        throw new IllegalArgumentException("bad property value. property name '" + propName + "'. Expected correct enum value, one of the [" + Arrays.toString(values) + "] , actual = " + propValue);
    }

}

View on GitHub (pinned to 5ce3bc58c3)

Solutions

  1. Find the property by name in the message and its owning annotation
  2. Change the value to a plain integer literal string without separators, units, or whitespace (e.g. "1000")
  3. If the value comes from external config, verify the placeholder resolves at runtime (log it once at startup)
  4. Add a startup assertion or test that parses all configured numeric values

Example fix

// before
@HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "1_000")

// after
@HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "1000")
Defensive patterns

Strategy: validation

Validate before calling

static String intProp(String name, String raw) {
  if (raw == null || !raw.matches("\\d+"))
    throw new IllegalStateException("Property " + name + " must be a plain integer, got: " + raw);
  return raw;
}
// wrap externalized values before injecting: intProp("timeout", config.get("hystrix.timeout"))

Try / catch

catch (IllegalArgumentException e) { log.error("{}", e.getMessage()); /* message names property and bad value — fix config and restart */ }

Prevention

When it happens

Trigger: @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "1_000"), value = "" (empty placeholder from external config), value = "10ms", or a locale-formatted number like "1.000".

Common situations: Values sourced from property files/environment where a placeholder was not resolved (literal '${timeout}'); trailing units or whitespace accidentally included; converting values from YAML that serialize with decimal points.

Related errors


AI-assisted analysis of Netflix/Hystrix@5ce3bc58c3 (2026-08-14). Data as JSON: /api/errors/acf55f93fd80723a. Report an issue: GitHub.