-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I have a row that requires two fields to be set.
Something akin to
foo <- exactly "foo"
bar <- exactly "bar"
If I give it "foo", it will return UnexpectedEndOfRow; however, I can make this error nicer, because I have some local information about what is missing.
There is a function
onError :: Decode e s a -> (DecodeErrors e -> Decode e s a) -> Decode e s a
but similar to the last issue (#47) it’s not at all clear to me how to go from e.g. decodeError :: DecodeError e -> DecodeValidation e a to a full Decode e s a, i.e how to fill that continuation of onError and provide an alternative error message.
Metadata
Metadata
Assignees
Labels
No labels