Closed juagarcafc closed 10 months ago
Hello @juagarcafc, thank you for reporting an issue.
How are you testing this lambda handler? If you are on a development
environment, errors are not reported by default and the force_report_data
setting needs to be set as well.
Hi @subzero10 thank you for your reply.
I'm testing a deployed lambda on AWS by invoking it. I have amended the code for the below as you advised and unfortunately it still does not report the error to honeybadger
from os import environ
from honeybadger import honeybadger
honeybadger.configure(
api_key=environ["HONEYBADGER_API_KEY"],
environment="staging",
force_sync=True,
report_data=True,
)
def lambda_handler(event, context):
"""
A buggy lambda function that tries to perform a zero division
"""
a = 1
b = 0
return a / b # This will be reported
FYI I'm able to report manual errors to honeybadger with the library, it won't just automatically report any runtime errors as the docs say it should.
Hey @juagarcafc, thanks for trying my suggestion. Let me try and reproduce this from my side and I will come back to you.
Hey @juagarcafc, I found the issue (#163). I will write here when the next version is released.
This should be fixed with v0.19.0
!
Thanks @subzero10 🙏🏼
Following the code here doesn't seem to report an alert to HB, is this meant to work with only this config? I have used the js wrapper before and it does work, unfortunately this doesn't work for python.