Skip to content

Instantly share code, notes, and snippets.

@enricop89
Created April 17, 2020 06:51
Show Gist options
  • Save enricop89/3dd8fc87c415d4c523332bde6504e0fc to your computer and use it in GitHub Desktop.
Save enricop89/3dd8fc87c415d4c523332bde6504e0fc to your computer and use it in GitHub Desktop.
AWS lambda handler - Global exceptions
module.exports.handler = async (event) => {
console.log('Received event:', JSON.stringify(event, null, 2));
try {
// Function Logic
} catch (err) {
console.log('[Handler] - Main function: ', err);
// Send the error to Third-party monitoring services
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment