Skip to content

Commit 9473c28

Browse files
committed
chore: rename to validation_exception_handler
1 parent 1131246 commit 9473c28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

aws_lambda_powertools/utilities/feature_flags/feature_flags.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def get_enabled_features(self, *, context: Optional[Dict[str, Any]] = None) -> L
391391

392392
return features_enabled
393393

394-
def exception_handler(self, exc_class: Exception | list[Exception]):
394+
def validation_exception_handler(self, exc_class: Exception | list[Exception]):
395395
"""Registers function to handle unexpected exceptions when evaluating flags.
396396
397397
It does not override the function of a default flag value in case of network and IAM permissions.
@@ -408,7 +408,7 @@ def exception_handler(self, exc_class: Exception | list[Exception]):
408408
```python
409409
feature_flags = FeatureFlags(store=app_config)
410410
411-
@feature_flags.exception_handler(Exception) # any exception
411+
@feature_flags.validation_exception_handler(Exception) # any exception
412412
def catch_exception(exc):
413413
raise TypeError("re-raised") from exc
414414
```

tests/functional/feature_flags/test_feature_flags.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@ def test_exception_handler(mocker, config):
16551655

16561656
feature_flags = init_feature_flags(mocker, mocked_app_config_schema, config)
16571657

1658-
@feature_flags.exception_handler(ValueError)
1658+
@feature_flags.validation_exception_handler(ValueError)
16591659
def catch_exception(exc):
16601660
raise TypeError("re-raised")
16611661

0 commit comments

Comments
 (0)