suddi / claudia-local-api

Command line utility to launch Express local API for claudia-api-builder. Test drive your lambda functions before deployment (https://www.npmjs.com/package/claudia-local-api)
https://www.npmjs.com/package/claudia-local-api
MIT License
15 stars 18 forks source link

Log error message as well as stack #27

Closed jrbarnard closed 4 years ago

jrbarnard commented 5 years ago

In logError we currently only log the stack, it would be good to log the message too, or just the entire error object:

function logError(logger, error) {
    // Probably better to log the entire thing as we may not have the message
    logger.error(error.message);
    logger.error(error.stack);
}

OR

function logError(logger, error) {
    logger.error(error);
}

What do you think?

suddi commented 4 years ago

Thanks for the report.

I have incorporated it into the latest release [3.0.4].