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

main.com.stytch.java.common.StytchException.kt Maven / Gradle / Ivy

There is a newer version: 6.7.0
Show newest version
package com.stytch.java.common

public sealed class StytchException(public open val reason: Any?) : Exception() {
    /**
     * Critical exception wrapper
     * @property reason provides a Throwable with information on what went wrong.
     * @property response provides the JSON response that was unable to be mapped
     */
    public data class Critical(
        override val reason: Throwable,
        val response: String? = null,
    ) : StytchException(reason)

    /**
     * Response exception wrapper
     * @property reason provides a StytchErrorResponse object with a reason as to what went wrong.
     */
    public data class Response(override val reason: ErrorResponse) : StytchException(reason)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy