Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upFixes #637; Preserve Err values when using Json.Decode.customDecoder #639
Conversation
referenced
this pull request
Jul 15, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jul 15, 2016
Member
I just ran into this independently and did a fix in 7f6e518. Someone pointed me here, which is very similar. My fix includes context information, so if you run into a customDecode nine levels into a JSON object, the error message will tell you about that context.
That said, it's probably still a good idea to test that the error message produced contains the Err str string as a subset. Are you willing to adapt your tests to the alternate implementation?
|
I just ran into this independently and did a fix in 7f6e518. Someone pointed me here, which is very similar. My fix includes context information, so if you run into a That said, it's probably still a good idea to test that the error message produced contains the |
evancz
closed this
Jul 15, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@evancz Gladly! I will open a new PR shortly. |
noahzgordon commentedJun 3, 2016
See issue: https://github.com/elm-lang/core/issues/637
This commit allows Err values returned by the second argument of
Json.Decode.customDecoderto be preserved when the decoder fails. This way all user-defined error messages are not swallowed by the decoder.