https://kotlinlang.org logo
s

Shawn A

06/06/2019, 5:22 PM
How do I force fuel to handle non 2xx status codes instead of throwing a fuelerror?
d

Derk-Jan Karrenbeld

06/06/2019, 5:25 PM
cc @kittinunf, I think it's adding a valid status codes interceptor
s

Shawn A

06/06/2019, 7:27 PM
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

Shawn A

06/07/2019, 4:00 PM
Thanks @Derk-Jan Karrenbeld
👍 1
k

kittinunf

06/08/2019, 4:20 AM
ah, I am late to the party! @Derk-Jan Karrenbeld you are awesome!!
😄 2
9 Views