Skip to content
Discussion options

You must be logged in to vote

Hey @rzulkoski! While it is maybe possible to hack TaskResult Error amenities, I would recommend to define your own "UserFacingError" plain old data type from which you would create values to store into the state when an Error is received. For example, something like:

struct UserFacingError: Equatable {
  let title: String
  let description: String
  let color: Color
}

I wouldn't use Errors to directly model things on the UI's side.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@jshier
Comment options

@rzulkoski
Comment options

@rzulkoski
Comment options

Answer selected by rzulkoski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants