diff --git a/turbo/src/main/kotlin/dev/hotwire/turbo/errors/LoadError.kt b/turbo/src/main/kotlin/dev/hotwire/turbo/errors/LoadError.kt index 73fc829c..4c32143a 100644 --- a/turbo/src/main/kotlin/dev/hotwire/turbo/errors/LoadError.kt +++ b/turbo/src/main/kotlin/dev/hotwire/turbo/errors/LoadError.kt @@ -1,6 +1,13 @@ package dev.hotwire.turbo.errors sealed interface LoadError : TurboVisitError { - data object NotPresent : LoadError - data object NotReady : LoadError + val description: String + + data object NotPresent : LoadError { + override val description = "Turbo Not Present" + } + + data object NotReady : LoadError { + override val description = "Turbo Not Ready" + } } diff --git a/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSession.kt b/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSession.kt index 04af0d21..77a8b3c4 100644 --- a/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSession.kt +++ b/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSession.kt @@ -291,7 +291,7 @@ class TurboSession internal constructor( "visitRequestFailedWithStatusCode", "visitIdentifier" to visitIdentifier, "visitHasCachedSnapshot" to visitHasCachedSnapshot, - "statusCode" to statusCode + "error" to visitError ) currentVisit?.let { visit ->