I am newbee in serverless framework, I try to read some lambda functions example. I find the interesting stuff, the handler of request always be null, for instance.
First, if you’re using the async handler syntax there is no callback parameter (officially). You’re supposed to return the result you want to send on success.
The first parameter to the callback function is the error if your handler fails. It’s supposed be an Error or subclass. If there is no error then you return null. If you’re using the async syntax you can just throw an error.