Anyone know a cleaner way to do synchronized, effe...
# arrow
d
Anyone know a cleaner way to do synchronized, effectless
Try
using arrow-fx's
fx
syntax? Here's what I've got:
Copy code
Try<Unit> {
                    when (response.status) {
                        InternalServerError -> throw AccountsGatewayException("Failed to get info for notification_id ${notificationId.value} on account ${accountId.value}. ${response.status.description}")
                        Gone -> throw NotificationDeletedException()
                    }
                }.fromTry { e -> e }.bind()