Skip to content

Commit b864b3e

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

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

awslambdaric/bootstrap.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,10 @@ def run(handler, lambda_runtime_client):
515515

516516
if error_result is not None:
517517
from .lambda_literals import lambda_unhandled_exception_warning_message
518-
519-
logging.warning(lambda_unhandled_exception_warning_message)
518+
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)