(20241224) Exception handling.

This commit is contained in:
2024-12-24 15:08:57 +05:30
parent 0af9401feb
commit 52aa5c37e4
@@ -265,10 +265,10 @@ class ZerodhaKiteTradingController(TradingController):
# Start by assuming failure: # Start by assuming failure:
symbol_list = TradingSymbolListBrokerResponse() symbol_list = TradingSymbolListBrokerResponse()
try: # Fit the token into the model:
zerodha_token = ZerodhaKiteAuthTokens(**auth_token.token)
# Fit the token into the model: try:
zerodha_token = ZerodhaKiteAuthTokens(**auth_token.token)
# Now create an instance of the Kite: # Now create an instance of the Kite:
kite = KiteConnect(api_key = auth_token.auth["apiKey"]) kite = KiteConnect(api_key = auth_token.auth["apiKey"])