All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.plusmobileapps.firebase.auth.model.network.ApiResponse.kt Maven / Gradle / Ivy

Go to download

A kotlin multiplatform mobile library for authenticating with Firebase for Android, iOS, and JVM

The newest version!
package com.plusmobileapps.firebase.auth.model.network

sealed class ApiResponse {

    /** Represents a successful network response (2xxx). */
    data class Success(val body: T) : ApiResponse()

    sealed class Error : ApiResponse() {
        /** Represents server (50x) and client (40x) errors. */
        data class HttpError(val code: Int, val errorBody: E?) : Error()

        /** Represent IOExceptions and connectivity issues. */
        object NetworkError : Error()

        /** Represent SerializationExceptions. */
        object SerializationError : Error()
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy