Skip to content

Instantly share code, notes, and snippets.

@tmanOC
Created January 27, 2020 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmanOC/6dac334bd65f43e46e77c99e24764b59 to your computer and use it in GitHub Desktop.
Save tmanOC/6dac334bd65f43e46e77c99e24764b59 to your computer and use it in GitHub Desktop.
Structure of a simple promise handler
methodThatReturnsAPromise().then(result => {
handleResult(result)
}).catch(err => {
handleAnyExceptions(err)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment