Skip to content

Better approach for "cause" with JsonDecodingException #32

@bowbahdoe

Description

@bowbahdoe

Right now, even though a JsonDecodingException can be caused by a tree of Failure, AtIndex, AtField, and OneOf (s) I do not propagate a cause to the uppermost exception.

The reasons for this are

  1. OneOf has multiple logical causes. I can pick the first or the last, but no option is really satisfactory.
  2. When I do make causes propagate, the errors start to suck to read.

image

What I decided to do was just have an errors field on OneOf and error field on AtIndex and AtField. Its not perfect, or even good,
but It makes the errors still be good to read and the information is at least programmatically recoverable.

image

So open call for a better solutions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions