You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can define timeout on entire Fetch after run with cats effect, but I can't find how to define timeout on 'sub' Fetch and handle it with 'default' value. Something like:
(
fetchUser,
fetchPost,
fetchComments.withTimeout(5.secs).handleError(List.empty)
).mapN { (user, post, comments) =>
EntirePost(user, post, comments)
}
So if fetchComments is too long we can cancel fetching it and return partly constructed structure.
The text was updated successfully, but these errors were encountered:
We can define timeout on entire Fetch after run with cats effect, but I can't find how to define timeout on 'sub' Fetch and handle it with 'default' value. Something like:
So if fetchComments is too long we can cancel fetching it and return partly constructed structure.
The text was updated successfully, but these errors were encountered: