summaryrefslogtreecommitdiffstats
path: root/openbb_terminal/common/ultima_newsmonitor_model.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_terminal/common/ultima_newsmonitor_model.py')
-rw-r--r--openbb_terminal/common/ultima_newsmonitor_model.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbb_terminal/common/ultima_newsmonitor_model.py b/openbb_terminal/common/ultima_newsmonitor_model.py
index 656ba75c53f..9b74c89aa63 100644
--- a/openbb_terminal/common/ultima_newsmonitor_model.py
+++ b/openbb_terminal/common/ultima_newsmonitor_model.py
@@ -230,6 +230,10 @@ def get_top_headlines(ticker: str) -> dict:
): # If data request failed
console.print("[red]Status code not 200. Unable to retrieve data\n[/red]")
return {}
- return data.json()
+ json = data.json()
+ if "message" in json:
+ console.print(f"[red]{json['message']}[/red]")
+ return {}
+ return json
console.print("[red]Ticker not supported. Unable to retrieve data\n[/red]")
return {}