Skip to content
Discussion options

You must be logged in to vote

Hi @jaredh159! Not sure if you've pulled recently, but last week we added to the deprecation message to also suggest using Effect.publisher, which acts as a Combine bridge for earlier for older platforms:

"Iterate over 'Publisher.values' in an 'EffectTask.run', instead, or use 'EffectTask.publisher'."

You can then use Publisher.catch and other Combine operations on the publisher in that block:

return .publisher {
  self.dependencyThatCanFail()
    .map { .response(.success($0)) }
    .catch { .response(.failure($0)) }
}

I'm going to convert this to a discussion since…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@jaredh159
Comment options

@Alex293
Comment options

@tlandsman
Comment options

@jaredh159
Comment options

@tlandsman
Comment options

Answer selected by jaredh159
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #1986 on March 21, 2023 17:38.