Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View yitz-grocerkey's full-sized avatar

Yitz yitz-grocerkey

View GitHub Profile
@yitz-grocerkey
yitz-grocerkey / ErrorInterceptor.kt
Created June 13, 2017 19:32
Retrofit RxJava global error handling in Kotlin
// for any errors that should be handled before being handed off to RxJava.
// In other words global error logic.
// An example might be 401 when not logging in
import okhttp3.Interceptor
import okhttp3.Response
class ErrorInterceptor: Interceptor {
override fun intercept(chain: Interceptor.Chain?): Response {