Skip to content

Commit a22ac0d

Browse files
committed
Introduce env var LAMBDA_DISABLE_EXCEPTION_WARNING
1 parent 46e4c6a commit a22ac0d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

awslambdaric/bootstrap.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,9 @@ def run(handler, lambda_runtime_client):
516516
if error_result is not None:
517517
from .lambda_literals import lambda_unhandled_exception_warning_message
518518

519-
logging.warning(lambda_unhandled_exception_warning_message)
519+
if os.environ.get("LAMBDA_DISABLE_EXCEPTION_WARNING"):
520+
logging.warning(lambda_unhandled_exception_warning_message)
521+
520522
log_error(error_result, log_sink)
521523
lambda_runtime_client.post_init_error(error_result)
522524

0 commit comments

Comments
 (0)