https://kotlinlang.org logo
#kotlin-fuel
Title
# kotlin-fuel
i

itnoles

02/26/2019, 3:36 AM
@Derk-Jan Karrenbeld https://github.com/kittinunf/fuel/issues/601#issuecomment-467058763 I am noticed result is actually Triple while the first one is from DefaultRequest, the second one is -1 but third one is actually 410..
🤪 1
d

Derk-Jan Karrenbeld

02/26/2019, 10:30 AM
so we just dont assign it correctly once
k

kittinunf

02/26/2019, 10:43 AM
I think it is this line right?
I guess we can fix this quickly
d

Derk-Jan Karrenbeld

02/26/2019, 10:54 AM
Is that the culprit? I don't see any of this code throwing http status exception, so I don't think it's here!
k

kittinunf

02/26/2019, 11:05 AM
🤔 maybe you are right ….
d

Derk-Jan Karrenbeld

02/26/2019, 11:07 AM
I think it happens in the process response thing
transform*
When we validate the status code
k

kittinunf

02/26/2019, 11:15 AM
yeah it is definitely in
SuspendableRequest
file
, oh I lied …
man, I think you should have just used my
Result
instead 🤪
🤣 1
there is one thing i learned as a lesson from this bug is that we should test not only the error is not null but also the value inside the error object as well.
d

Derk-Jan Karrenbeld

02/26/2019, 11:52 AM
This is great!
com.github.[secure].fuel.coroutines.ObjectTest > captureDeserializationException FAILED
java.lang.ClassCastException Caused by: java.lang.ClassCastException
^_^
k

kittinunf

02/26/2019, 11:55 AM
Oh ???!
d

Derk-Jan Karrenbeld

02/26/2019, 11:56 AM
(Probably wrapping or error.xxx issue when there is no response?)
k

kittinunf

02/26/2019, 12:01 PM
d

Derk-Jan Karrenbeld

02/26/2019, 12:03 PM
This is why I wrap in fuelerror everywhere
It could be this, I don't know
you should check the failing test 😛
k

kittinunf

02/26/2019, 12:05 PM
yeah …. it is painful …
maybe my
Result
is not so good after all 😢
d

Derk-Jan Karrenbeld

02/26/2019, 12:12 PM
I think it's nice and fine, but now that there is a native result, it's less helpful
k

kittinunf

02/26/2019, 12:37 PM
OK! I think it should be ready 🙂
@Derk-Jan Karrenbeld when you have time, please send me some love for #603
❤️ 1