Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple python Lambda: Cannot read property 'statusCode' of null #722

Closed
m4nuC opened this issue Jun 28, 2019 · 3 comments
Closed

Simple python Lambda: Cannot read property 'statusCode' of null #722

m4nuC opened this issue Jun 28, 2019 · 3 comments

Comments

@m4nuC
Copy link

m4nuC commented Jun 28, 2019

When invoking the the bellow Python lambda:

def handler(event, context):

    return {
        "body”: "this is a response"
    }

The error Cannot read property 'statusCode' of null is thrown. Am I missing something or is this a problem with Python support ?

Thanks a lot

@dherault
Copy link
Owner

Hi, you also need to return statusCode like this in order for lambda integration to work.

return {
   "statusCode": 200,
   "body”: "this is a response"
 }

But it should also work without a status code. So I'm marking this issue as a bug.

@m4nuC
Copy link
Author

m4nuC commented Jul 1, 2019

@dherault I’ve removed the node_modules folder and reinstalled then it started working. I’ll close it for now and reopen if I bump into this again. Thanks

@dherault
Copy link
Owner

dherault commented Jul 2, 2019

Fixed in v5.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants