You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The try catch in handler.py covers too many things, which ends up obfuscating/swallowing errors in certain situations. Additionally, the general except clause allows further failures -- for example, if an error causes app_module to not get set, the actual exception is consumed (and printed), then another exception is caused when the code tries to look up the debug flag on the app_module variable.
I noticed this when trying to track down an issue that this was hiding. Some details so other people can maybe find this and get insight if they have the same superficial symptoms.
On requests, the browser returns {"message":"Missing Authentication Token"} which is not anywhere in the project code.
UnboundLocalError: local variable 'app_module' referenced before assignment
FYI - my error was being thrown by my code during import -- look at the line above 'local variable app_module referenced before assignment' if you are having a similar bug and are trying to debug your own application.
The text was updated successfully, but these errors were encountered:
https://github.com/Miserlou/Zappa/blob/master/zappa/handler.py#L77-L183
The try catch in handler.py covers too many things, which ends up obfuscating/swallowing errors in certain situations. Additionally, the general except clause allows further failures -- for example, if an error causes app_module to not get set, the actual exception is consumed (and printed), then another exception is caused when the code tries to look up the debug flag on the app_module variable.
I noticed this when trying to track down an issue that this was hiding. Some details so other people can maybe find this and get insight if they have the same superficial symptoms.
On requests, the browser returns
{"message":"Missing Authentication Token"}
which is not anywhere in the project code.Using
zappa tail <stage>
showed an error printed by the print statement in theexcept Exception as e
block https://github.com/Miserlou/Zappa/blob/master/zappa/handler.py#L173 then a stack trace of a subsequent exception:FYI - my error was being thrown by my code during import -- look at the line above 'local variable app_module referenced before assignment' if you are having a similar bug and are trying to debug your own application.
The text was updated successfully, but these errors were encountered: