Created
March 18, 2016 15:25
-
-
Save chrisl8888/3b41062ab883b33454e8 to your computer and use it in GitHub Desktop.
Handling Promise errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
promise.catch(error => { | |
if (error instanceof OkayError) { | |
return Observable.of('okay'); | |
} else { | |
throw error | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment