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

Error when using honeybadger with AWS Lambda with python 3.10 #141

Open
samuelcea opened this issue May 30, 2023 · 1 comment
Open

Error when using honeybadger with AWS Lambda with python 3.10 #141

samuelcea opened this issue May 30, 2023 · 1 comment
Assignees

Comments

@samuelcea
Copy link

Hello,

I'm having a problem when trying to get Honeybadger workiing with an AWS Lambda with python 3.10 (recently released), i'm following the code exposed on the docs to configure honeybadger on lambdas and it doesn't show more than just configuring it, but when an error is raised it doesn't get it and the logs shows this Lambda function not wrapped by honeybadger: module '__main__' has no attribute 'handle_event_request', if i call .notify inside the code it works, but when an unexpected exception is raised, it's not triggered to HB.

This is my code

honeybadger.configure(api_key=Settings.HONEYBADGER_API_KEY, environment=Settings.ENVIRONMENT)


def handler(event: dict, context: LambdaContext) -> None:  # dead: disable
    try:
        logger.info(f"event: {event} context {context}")
        for record in chain.from_iterable(event["records"].values()):
            # example code
    except Exception as e:
        honeybadger.notify(e)
        raise e

I need to clarify that the api_key is correctly and the environment too, if not, i shouldn't be getting the error on my HB dashboard.

@subzero10
Copy link
Member

Hey @samuelcea, thanks for submitting an issue!
We'll take a look.

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

No branches or pull requests

3 participants