From 4e5790cffb000b622aea698e43c872d9c518605f Mon Sep 17 00:00:00 2001 From: Sebas LG Date: Fri, 29 Dec 2023 08:28:14 +0100 Subject: [PATCH] Use new and better data objects in ActionResults --- .../nl/q42/template/actionresult/domain/ActionResult.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/actionresult/src/main/kotlin/nl/q42/template/actionresult/domain/ActionResult.kt b/core/actionresult/src/main/kotlin/nl/q42/template/actionresult/domain/ActionResult.kt index 6077d22..a27f43e 100644 --- a/core/actionresult/src/main/kotlin/nl/q42/template/actionresult/domain/ActionResult.kt +++ b/core/actionresult/src/main/kotlin/nl/q42/template/actionresult/domain/ActionResult.kt @@ -21,13 +21,13 @@ sealed class ActionResult { 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(val result: T) : ActionResult()