Created
April 5, 2017 09:23
-
-
Save julianjelfs/cab12ba4206679bc6cde5f580ac844f5 to your computer and use it in GitHub Desktop.
Remote data responding to error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ResultsReceived data -> | |
| ( { model | data = data } | |
| , Cmd.none | |
| ) | |
| ResultsReceived (Failure err) -> | |
| ( { model | data = (Failure err)} | |
| , systemError (toString err) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd do this:
I'd also consider
systemError : a -> Cmd msg.(ie. let it do the
toStringfor you).