nguyenterfell commited on
Commit
6dcde74
·
verified ·
1 Parent(s): a7173dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -50,10 +50,12 @@ def my_crypto_price_tool(arg1:str, arg2:int)-> str: #it's import to specify the
50
  return f"{symbol.upper()} price: {price} {currency.upper()} | Market Sentiment: {sentiment} ({market_change:.2f}% 24h change)"
51
  return f"Error: Unable to fetch price for {symbol.upper()} in {currency.upper()}."
52
 
53
- except requests.exceptions.RequestException as e:
54
- return f"Error: {e}
 
 
 
55
 
56
-
57
 
58
  @tool
59
  def get_current_time_in_timezone(timezone: str) -> str:
 
50
  return f"{symbol.upper()} price: {price} {currency.upper()} | Market Sentiment: {sentiment} ({market_change:.2f}% 24h change)"
51
  return f"Error: Unable to fetch price for {symbol.upper()} in {currency.upper()}."
52
 
53
+ # except requests.exceptions.RequestException as e:
54
+ # return f"Error: {e}
55
+ except Exception as e:
56
+ return f"Error: '{e}': {str(e)}"
57
+
58
 
 
59
 
60
  @tool
61
  def get_current_time_in_timezone(timezone: str) -> str: