log error in lambda

This commit is contained in:
samepant 2021-03-10 22:30:09 -05:00
parent 51756fef9e
commit fe2c89534c
2 changed files with 2 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,3 @@
/* code from functions/todos-create.js */
import faunadb from "faunadb"; /* Import faunaDB sdk */
/* configure faunaDB Client with our secret */
@ -7,9 +6,7 @@ const client = new faunadb.Client({
secret: process.env.FAUNADB_SECRET,
});
/* export our lambda function as named "handler" export */
exports.handler = async (event, context, callback) => {
/* parse the string body into a useable JS object */
const data = JSON.parse(event.body);
console.log("Function `createMultisig` invoked", data);
const multisig = {
@ -25,6 +22,7 @@ exports.handler = async (event, context, callback) => {
body: JSON.stringify(response),
};
} catch (error) {
console.log("error", error);
return {
statusCode: 400,
body: JSON.stringify(error),