Skip to content

Instantly share code, notes, and snippets.

@douglasiacovelli
Last active April 13, 2020 12:34
Show Gist options
  • Select an option

  • Save douglasiacovelli/d7d9a7cc3e0dd20ec81783607d044ff9 to your computer and use it in GitHub Desktop.

Select an option

Save douglasiacovelli/d7d9a7cc3e0dd20ec81783607d044ff9 to your computer and use it in GitHub Desktop.
sealed class ResultWrapper<out T> {
data class Success<out T>(val value: T): ResultWrapper<T>()
data class GenericError(val code: Int? = null, val error: ErrorResponse? = null): ResultWrapper<Nothing>()
object NetworkError: ResultWrapper<Nothing>()
}
@shamshadpattani
Copy link

what is ErrorResponse?

@douglasiacovelli
Copy link
Author

douglasiacovelli commented Apr 13, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment