8/Jan 2017
By Marin Todorov
4 min. read
Sometimes your observable will fail with an error but that would not mean that you need to give up trying. For example saving to a file might fail because the file is locked temporarily but a split second later would be unlocked and ready for your changes. Same goes for web requests - there might be a temporary glitch in connectivity which could make the observable fail.
RxSwift offers a special operator called retry, which allows you to try another time the observable subscription upon error.