const invokeLambdaFunction = require('../src/lambda-invoke-function');

function respondOnError(error) {
  const payload = {
    message: error.message,
  };

  console.error(`Responding to user with error: ${error.message}`);

  // @todo Write the Lambda function that responds if there is an error.
  // return invokeLambdaFunction(payload, 'need-to-write-this');

  return Promise.resolve('OK');
}

module.exports = respondOnError;

const invokeLambdaFunction = require('../src/lambda-invoke-function');

function respondOnError(error) {
  const payload = {
    message: error.message,
  };

  return invokeLambdaFunction(payload, 'need-to-write-this');
}

module.exports = respondOnError;

--- 
+++ 
@@ -5,12 +5,7 @@
     message: error.message,
   };
 
-  console.error(`Responding to user with error: ${error.message}`);
-
-  // @todo Write the Lambda function that responds if there is an error.
-  // return invokeLambdaFunction(payload, 'need-to-write-this');
-
-  return Promise.resolve('OK');
+  return invokeLambdaFunction(payload, 'need-to-write-this');
 }
 
 module.exports = respondOnError;
Mark response bot as @todo.
