@@ -136,22 +136,25 @@ def _track(self, user_id: str, event_name: str, data: dict):
136136 self .get_mp_instance ().track (user_id , event_name , data )
137137
138138 def _track_method (self , args , kwargs , success : bool ):
139- client = self .get_client ()
140- if not client :
141- return
142- function_name = self .function .__name__ if self .function else ""
143- arguments = self .extract_arguments (self .function , * args , ** kwargs )
144- event_name , properties = self .default_parser (function_name , arguments )
145- user_id = client .controller .team_data .creator_id
146- team_name = client .controller .team_data .name
147-
148- properties ["Success" ] = success
149- default = self .get_default_payload (team_name = team_name , user_id = user_id )
150- self ._track (
151- user_id ,
152- event_name ,
153- {** default , ** properties , ** CONFIG .get_current_session ().data },
154- )
139+ try :
140+ client = self .get_client ()
141+ if not client :
142+ return
143+ function_name = self .function .__name__ if self .function else ""
144+ arguments = self .extract_arguments (self .function , * args , ** kwargs )
145+ event_name , properties = self .default_parser (function_name , arguments )
146+ user_id = client .controller .team_data .creator_id
147+ team_name = client .controller .team_data .name
148+
149+ properties ["Success" ] = success
150+ default = self .get_default_payload (team_name = team_name , user_id = user_id )
151+ self ._track (
152+ user_id ,
153+ event_name ,
154+ {** default , ** properties , ** CONFIG .get_current_session ().data },
155+ )
156+ except BaseException :
157+ pass
155158
156159 def __get__ (self , obj , owner = None ):
157160 if obj is not None :
0 commit comments