This commit is contained in:
Charlie Tonneslan 2026-03-23 09:41:57 -04:00 committed by GitHub
commit 8db73d7440
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View File

@ -58,8 +58,11 @@ def get_indicator(
}
if indicator not in supported_indicators:
raise ValueError(
f"Indicator {indicator} is not supported. Please choose from: {list(supported_indicators.keys())}"
supported = ", ".join(supported_indicators.keys())
return (
f"Error: Indicator '{indicator}' is not supported. "
f"Supported indicators: {supported}. "
f"Please retry with one of the supported indicators."
)
curr_date_dt = datetime.strptime(curr_date, "%Y-%m-%d")

View File

@ -129,8 +129,11 @@ def get_stock_stats_indicators_window(
}
if indicator not in best_ind_params:
raise ValueError(
f"Indicator {indicator} is not supported. Please choose from: {list(best_ind_params.keys())}"
supported = ", ".join(best_ind_params.keys())
return (
f"Error: Indicator '{indicator}' is not supported. "
f"Supported indicators: {supported}. "
f"Please retry with one of the supported indicators."
)
end_date = curr_date