Companion

Functions

Link copied to clipboard

The mapper for a ktkit service: a non-2xx body is an ApiError and becomes a RestClientErrorSpec.RestClientReceiveError; a send failure is a RestClientErrorSpec.RestClientRequestError; an undecodable body is a RestClientErrorSpec.RestClientDeserializationError.

Link copied to clipboard
inline fun <E : ErrorSpec, reified P : Any> of(unauthorized: E? = null, noinline apiError: (P, HttpStatusCode) -> E, noinline networkError: (Throwable) -> E, noinline parseError: (Throwable) -> E): RestErrorMapper<E, P>