Skip to content

Instantly share code, notes, and snippets.

@ludovicwyffels
Created September 7, 2019 15:40
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 ludovicwyffels/fdd1c48e9075058256bd5c7cc42b50f1 to your computer and use it in GitHub Desktop.
Save ludovicwyffels/fdd1c48e9075058256bd5c7cc42b50f1 to your computer and use it in GitHub Desktop.
import logger from '../logSetup';
processLoan(id: number, userId: number) {
try {
getLoanDeatilsById()
} catch(error) {
log.error(`Failed to do getLoanDetails with id ${id}, ignoring it and trying to getLoanDetailsByUserId`, error);
// good example: provide what failed, and how you are handling.
// e.g here on fail I am trying to call other function
getLoanDetailsByUserId();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment