How do I force fuel to handle non 2xx status codes...
# kotlin-fuel
s
How do I force fuel to handle non 2xx status codes instead of throwing a fuelerror?
d
cc @kittinunf, I think it's adding a valid status codes interceptor
s
I've seen examples of online using
validatorResponseInterceptor
, but that function doesn't exist anymore.
What is the alternative to
validatorResponseInterceptor
? Since it doesn't exist anymore.
In other words:
Copy code
var responseValidator: ResponseValidator = { response ->
        !(response.isServerError || response.isClientError)
    }
is the default. Change to something like
{ response -> true }
s
Thanks @Derk-Jan Karrenbeld
👍 1
k
ah, I am late to the party! @Derk-Jan Karrenbeld you are awesome!!
😄 2