Skip to content

Exceptions thrown in handler function make process hang #57

@danielthepope

Description

@danielthepope

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions