-
-
Save richardgrantserverless/436cadac680c55a0327c9fed77a7cbd3 to your computer and use it in GitHub Desktop.
This file contains 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
module.exports.hello = async (event, context) => { | |
try { | |
// do some real stuff but it throws an error, oh no! | |
throw new Error('new error') | |
} catch (error) { | |
context.captureError(error) | |
} | |
return { | |
statusCode: 400, | |
body: JSON.stringify({ error: 'my nice error message' }), | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment