Invalid Value
class InvalidValue(val path: String, val raw: Any?, val expected: String, val hint: String? = null) : ConfigError
A value was present but could not be converted to the expected type.
Generated by Deserializer when a YAML value (or environment variable string) cannot be coerced to the target Kotlin type, or when an enum constant is not recognised.
Example - a non-numeric string where an Int is expected:
port: "not_a_number"Content copied to clipboard
produces: InvalidValue(path = "server.port", raw = "not_a_number", expected = "Int")
Since
1.0
Parameters
path
Dot-separated field path.
raw
The original value from the YAML map (may be null).
expected
Human-readable description of the expected type or value set.
hint
Optional contextual hint (e.g. "did you mean 'INFO'?").