errorOf

suspend fun errorOf(response: HttpResponse): E(source)

The E for a non-2xx response: unauthorized on a 401 when set, else apiError over the decoded body.