INNER CODE UNIT · Python
frame
akutayural/APIException · api_exception/__init__.py:357
frame = traceback.extract_stack()[-3] # Capture the frame where the exception is raised
if log_traceback:
logger.error(f"Exception Raised in {frame.filename}, line {frame.lineno}")
meta.update({
"raise_file": frame.filename,
"raise_line": frame.lineno
})
logger.error(
f"Code: {exc.error_code}, Status: {exc.status}, Description: {exc.description}")
meta.update({
"error_code": exc.error_code,
"err_message": exc.message,
"status": getattr(exc.status, "value", str(exc.status)),
"description": exc.description,
})
if getattr(exc, "log_message", None) is not None:
if isinstance(exc.log_message, dict):