Initial error handling for registration v2.

This commit is contained in:
Nicholas Tinsley
2024-05-06 15:07:59 -04:00
committed by Alex Hart
parent 49ba83dda8
commit 9c5bb4aa17
7 changed files with 328 additions and 54 deletions

View File

@@ -51,7 +51,7 @@ sealed class NetworkResult<T>(
data class NetworkError<T>(val exception: IOException) : NetworkResult<T>()
/** Indicates we got a response, but it was a non-2xx response. */
data class StatusCodeError<T>(val code: Int, val body: String?, val exception: IOException) : NetworkResult<T>()
data class StatusCodeError<T>(val code: Int, val body: String?, val exception: NonSuccessfulResponseCodeException) : NetworkResult<T>()
/** Indicates that the application somehow failed in a way unrelated to network activity. Usually a runtime crash. */
data class ApplicationError<T>(val throwable: Throwable) : NetworkResult<T>()