Serverless logs

What happens if something goes wrong? We do not have error handling in place, but we can test the logging just by feeding the error while invoking the function. So, let's invoke the function with an error in the data, as shown in the following code: 

$serverless invoke --function bikesearch --data '{"trm":"Albemarle"}' -lServerless: Calling function: bikesearch...  Error --------------------------------------------------  Internal Server Error     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.  Get Support --------------------------------------------     Docs: docs.serverless.com     Bugs: github.com/serverless/serverless/issues     Forums: forum.serverless.com     Chat: gitter.im/serverless/serverless Your Environment ...

Get DevOps for Serverless Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.