Skip to content

Commit

Permalink
Merge pull request #47 from Q42/sebaslogen-patch-1
Browse files Browse the repository at this point in the history
Use new and better data objects in ActionResults
  • Loading branch information
sebaslogen authored Jan 8, 2024
2 parents 56b2241 + 4e5790c commit ca06ea7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ sealed class ActionResult<out T : Any?> {

data class ServerError(override val exception: Exception, val message: String) : Error(exception)

object NotFoundError : Error(Exception("404: Not Found"))
data object NotFoundError : Error(Exception("404: Not Found"))

data class NetworkError(override val exception: Exception) : Error(exception)

data class Other(override val exception: Exception) : Error(exception)

object NotImplemented : Error(Exception("API error format not implemented"))
data object NotImplemented : Error(Exception("API error format not implemented"))
}

data class Success<T : Any?>(val result: T) : ActionResult<T>()
Expand Down

0 comments on commit ca06ea7

Please sign in to comment.