MCPcopy Create free account
hub / github.com/HiddenCodeDevs/BlumTelegramBot / wrapper

Method wrapper

bot/core/api.py:33–42  ·  view source on GitHub ↗
(self, *arg, **kwargs)

Source from the content-addressed store, hash-verified

31 @staticmethod
32 def error_wrapper(method):
33 async def wrapper(self, *arg, **kwargs):
34 try:
35 return await method(self, *arg, **kwargs)
36 except NeedRefreshTokenError:
37 await self.refresh_tokens()
38 return await method(self, *arg, **kwargs)
39 except NeedReLoginError:
40 raise NeedReLoginError
41 except Exception as e:
42 self._log.error(f"Error on BlumApi.{method.__name__} | {type(e).__name__}: {e}")
43 return wrapper
44
45 async def get(self, url: str):

Callers

nothing calls this directly

Calls 1

refresh_tokensMethod · 0.95

Tested by

no test coverage detected