Zappa
Zappa copied to clipboard
[Migrated] Wrap Call to Application for Better Error Reporting
Originally from: https://github.com/Miserlou/Zappa/issues/963 by mcrowson
Context
When a users application fails to load the only log that is in CW is usually just 'NoneType' object is not callable. This is not terribly helpful for debugging purposes.
Expected Behavior
When the user's application fails to load let them know.
Actual Behavior
They get a cryptic message.
Possible Fix
After we get back the response from the middleware: https://github.com/Miserlou/Zappa/blob/master/zappa/middleware.py#L66
I think we could check the response to see if it exists (is it a None type). Then we can log something a little more explicit before continuing.
"The application was not able to load. Please ensure that all packages are included in the project and that they are built according to Lambda's needs."
or something like that.
Steps to Reproduce
- Setup a flask app that imports a lib that isn't in the project.
Your Environment
- Zappa version used:
- Operating System and Python version:
- The output of
pip freeze: - Link to your project (optional):
- Your
zappa_settings.py:
Re-raising this issue to be the main issue to address `"NoneType' object is not callable" issues.
Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.
Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.