diff --git a/src/flagd/demo.flagd.json b/src/flagd/demo.flagd.json index a4b744af08..5501f38feb 100644 --- a/src/flagd/demo.flagd.json +++ b/src/flagd/demo.flagd.json @@ -37,7 +37,7 @@ "API fetch error": "api_err", "off": "off" }, - "defaultVariant": "Database timeout" + "defaultVariant": "API fetch error" }, "slowRecommendationRegionSpan": { "description": "Create a slow 5sec span in the recommendation service (get_product_list) for the San Francisco region", diff --git a/src/recommendation/recommendation_server.py b/src/recommendation/recommendation_server.py index 1e4a4c5474..5b75f256f6 100644 --- a/src/recommendation/recommendation_server.py +++ b/src/recommendation/recommendation_server.py @@ -130,11 +130,11 @@ def get_product_list(request_product_ids): time.sleep(10) raise TimeoutError("Request to the database timed out") elif errs_enabled_value == "db_conn_err": - pass + raise ConnectionError("Unable to connect to the database") elif errs_enabled_value == "api_err": - pass + raise RuntimeError("Failed to fetch product info from external api") else: - pass + raise Exception("An unknown error occured")