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

Exceptions thrown in handler function make process hang #57

Closed
danielthepope opened this issue Nov 20, 2019 · 1 comment · Fixed by #58
Closed

Exceptions thrown in handler function make process hang #57

danielthepope opened this issue Nov 20, 2019 · 1 comment · Fixed by #58

Comments

@danielthepope
Copy link
Contributor

If the handler function throws an error, the execution of lambda_call never returns. A stack trace is printed containing the message TypeError: Object of type FrameSummary is not JSON serializable.

Looks like this is caused in line 127 of main.py (where you're setting stackTrace):

        result = json.dumps({
            "errorMessage": str(err[1]),
            "stackTrace": traceback.extract_tb(err[2]),
            "errorType": err[0].__name__
        }, indent=4, separators=(',', ': '))

json.dumps is not happy with serializing an array of FrameSummary objects, which is what extract_tb returns.

@kevinpowe
Copy link

Thank you so much for this. Works perfectly now!

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