Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save betty-godier/8ed3f51d146b1090440a72279edebf33 to your computer and use it in GitHub Desktop.
Save betty-godier/8ed3f51d146b1090440a72279edebf33 to your computer and use it in GitHub Desktop.
Cannot convert return expression of type 'Fail< >' to return type 'AnyPublisher< >'

Author: Betty Godier | Twitter: @BettyGodier | Email: [email protected]

#Useful solution to Fix mistake with Combine and publisher

"Cannot convert return expression of type 'Fail< >' to return type 'AnyPublisher< >' "

or

"Cannot convert return expression of type 'Result< >' to return type 'AnyPublisher< >' "

1️⃣ After the publisher , add

.eraseToAnyPublisher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment