It's not easy to handle such inconsistent API.
But if you cannot fix this on server side...
You can use some sort dynamic API (like parse to Map<Any, Any>)
gildor
06/30/2018, 2:03 PM
Or use multi-step parsing to parse to corresponding error class, but still should check type on runtime
r
rkeazor
06/30/2018, 2:12 PM
You would have to parse the json and check for the error body.Yea I agree API like this are annoying. They should just fail with a error code if something is wrong
rkeazor
06/30/2018, 2:13 PM
But anyway, this is not in the scope of the chat lol.Wee I always tell you, Kotlin specific lol
a
Ayden
06/30/2018, 4:29 PM
@rkeazoraw! I'm so sorry Robert. š I will be extra careful next time. My apologise.
Ayden
06/30/2018, 4:30 PM
@gildor thanks Andrey, definitely will try it out!
r
rkeazor
06/30/2018, 4:41 PM
no need to apologize to me, iām just reiterating the the channel rules lol. sooner or later we are going to have rename this channel to the slackoverflow channelstackoverflowš¤¦āāļø