What went wrong.
Additional error options, including the issues.
Optional ReadonlycauseOptional ReadonlycodeReadonlyissuesWhat failed, so a log says which field rather than "validation failed".
Optional ReadonlymetadataConverts the error to a formatted string representation.
Optionalmultiline: boolean
Determine if output value must be multiline or not.
A formatted error string.
StaticcreateCreate a RuntimeError.
Optionaloptions: ErrorOptions
The options to create a RuntimeError.
A new RuntimeError instance.
Raised when what a handler produced does not match the schema its resource published.
This is a server-side fault, deliberately. The resource's schema is a promise made to every caller and to the published contract; data that breaks it means the application is about to answer something it documented it would not. Returning it anyway is the failure — a client cannot detect it, and a consumer generated from the contract will break on a field that was supposed to be there.
It fires on a genuine breach, not on a difference: a schema strips what it does not describe, so extra fields are simply not exposed. Reaching this means something the contract requires is missing or has the wrong type.