Skip to content

Instantly share code, notes, and snippets.

@richardgrantserverless
Created Jun 1, 2022
Embed
What would you like to do?
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