Skip to content

Instantly share code, notes, and snippets.

@deepal
Last active October 14, 2019 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save deepal/406a7cf765c876605949d51d5a245370 to your computer and use it in GitHub Desktop.
Save deepal/406a7cf765c876605949d51d5a245370 to your computer and use it in GitHub Desktop.
function processUsers() {
try {
const body = await client.get('http://example.com/users');
const users = body.users || [];
// do something with users
} catch (err) {
// handle error
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment