Join Slack
i'm using a ktor client with `JsonFeature` , but I would like to wrap my return types with a `Result...
# ktor
w
william
11/16/2020, 12:17 AM
i'm using a ktor client with
JsonFeature
, but I would like to wrap my return types with a
Result
sealed class type of thing instead of exceptions when a network error occurs - any suggestions for going forward with this?
c
cisimon7
11/16/2020, 5:21 AM
how about wrapping calls with runCatching { }?
w
william
11/16/2020, 12:48 PM
yeah thats what i was thinking of doing. i wasn't sure if i could add a feature to do this automatically or something
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by