of

fun of(code: String, message: String, violations: List<Violation> = emptyList(), extensions: Map<String, Any?> = emptyMap()): ErrorInfo

The error code with message, the field-level violations and the structured extensions.