Skip to content

Commit

Permalink
Feature Flags lambda, service and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abbas-khan10 committed Feb 19, 2024
1 parent 055cc12 commit 1e53d4a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lambdas/services/feature_flags_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ def __init__(self):
def request_app_config_data(url: str):
config_data = requests.get(url)
try:
logger.info(config_data)
logger.info(config_data.json())
data = config_data.json()
except JSONDecodeError as e:
logger.error(
Expand All @@ -35,10 +33,10 @@ def request_app_config_data(url: str):
error=LambdaError.FeatureFlagJsonFailure,
status_code=config_data.status_code,
)

if config_data.status_code == 200:
return data
if config_data.status_code == 400:
logger.info(config_data)
logger.error(
str(data),
{"Result": "Error when retrieving feature flag from AppConfig profile"},
Expand Down

0 comments on commit 1e53d4a

Please sign in to comment.