MCPcopy Create free account
hub / github.com/caesarHQ/textSQL / failsoft

Function failsoft

api/app/api/utils/caesar_logging.py:8–17  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

6from app.config import EVENTS_ENGINE
7
8def failsoft(func):
9 @wraps(func)
10 def wrapper(*args, **kwargs):
11 try:
12 result = func(*args, **kwargs)
13 except Exception as e:
14 print('error logging with ', e)
15 result = None
16 return result
17 return wrapper
18
19def log_apicall(duration, provider, model, input_tokens, output_tokens, service, purpose, session_id=None, success=True, log_message=None):
20 if not EVENTS_ENGINE:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected