log error in lambda
This commit is contained in:
parent
51756fef9e
commit
fe2c89534c
File diff suppressed because one or more lines are too long
@ -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),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user