(20241224) Exception handling.
This commit is contained in:
@@ -265,11 +265,11 @@ class ZerodhaKiteTradingController(TradingController):
|
|||||||
# Start by assuming failure:
|
# Start by assuming failure:
|
||||||
symbol_list = TradingSymbolListBrokerResponse()
|
symbol_list = TradingSymbolListBrokerResponse()
|
||||||
|
|
||||||
try:
|
|
||||||
|
|
||||||
# Fit the token into the model:
|
# Fit the token into the model:
|
||||||
zerodha_token = ZerodhaKiteAuthTokens(**auth_token.token)
|
zerodha_token = ZerodhaKiteAuthTokens(**auth_token.token)
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
# 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"])
|
||||||
kite.set_access_token(zerodha_token.accessToken)
|
kite.set_access_token(zerodha_token.accessToken)
|
||||||
|
|||||||
Reference in New Issue
Block a user