https://kotlinlang.org logo
#arrow
Title
# arrow
d

dave08

02/20/2023, 4:04 PM
Is there a library or sample in using the Ktor client with Arrow?
s

Stylianos Gakis

02/20/2023, 4:06 PM
Oh you said client, this is a backend project. But still a lot of the same should apply. What exactly are you looking for?
d

dave08

02/20/2023, 4:10 PM
I'm already looking at that... but like you said, it's backend... I'm just looking for some kind of Arrow wrapper for the main failures that could happen in Ktor client... like serialization, status codes, etc... it's probably not too hard to build, but I was wondering if someone already did it.
It's also a question of if a service is down, how is that typically handled in Arrow. I know there's something about CircuitBreakers etc... just wondering how all that looks when it's in place.
s

Stylianos Gakis

02/20/2023, 4:17 PM
If a service is down, won’t that result in a normal http error code, which you can map to an error? Other than that, I don’t know such a repo, let’s see if someone else does
s

simon.vergauwen

02/20/2023, 4:22 PM
Here is what I've been doing in the few cases I need
client
. https://github.com/47deg/gh-alerts-subscriptions-kotlin/blob/db4357dd758d56eb6ca23[…]e6f877f8855e95ebb/src/main/kotlin/alerts/github/GithubClient.kt I've also made an internal library at my previous job around dapr, maybe I can ask them to open-source it.
d

dave08

02/20/2023, 4:41 PM
Thanks, that's helpful 😃!
20 Views