RendererErrorMessage

A renderer-side error.

The schema splits this by code: the three reserved codes take a shape that must locate the failure in the message (Validation), and any other code takes a shape that must name either the surface or the call it belongs to, but not both (Generic).

Inheritors

Types

Link copied to clipboard
data class Generic(val code: String, val message: String, val scope: RendererErrorMessage.Scope, val additional: Map<String, JsonElement> = emptyMap()) : RendererErrorMessage

Any other failure, attributed to exactly one of a surface or a function call.

Link copied to clipboard
sealed interface Scope

What a Generic error is about. Exactly one of the two, never both and never neither.

Link copied to clipboard
data class Validation(val validationCode: ValidationErrorCode, val surfaceId: String, val path: String, val message: String) : RendererErrorMessage

A message the renderer refused, located by path within it.

Properties

Link copied to clipboard
abstract val code: String

The wire value of code.

Link copied to clipboard
abstract val message: String

A sentence or two on what went wrong.