Created
March 3, 2019 19:01
-
-
Save deepal/c38eb4ecf74011cf6fa36dc4bd767946 to your computer and use it in GitHub Desktop.
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
| async function getUser(userId) { | |
| if (!userId) throw new InvalidInputError('userId is not provided'); | |
| try { | |
| return getUserFromApi(userId); | |
| } catch (err) { | |
| throw err; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment