SchemaErrorModule

PackageReified.Schema
Functions for lowering and rendering boundary schema failures.

Summary

NameSignatureSynopsis
ofParseErrorSchemaError.ofParseError errorLowers a parse failure.
renderSchemaError.render errorRenders a schema error as an English sentence.

ofParseError

SchemaError.ofParseError error
Member
Lowers a parse failure. Parsing failures never become constraint violations.

Parameters

NameTypeDescription
errorParseError

Returns

SchemaError

Verification Examples

ParseError.MissingValue "int" |> SchemaError.ofParseError

render

SchemaError.render error
Member
Renders a schema error as an English sentence.

Parameters

NameTypeDescription
errorSchemaError

Returns

string

Verification Examples

SchemaError.render (SchemaError.InvalidFormat "int") // "Expected int format."