fix: replace 'error' key with 'exc' in logger extra params
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Successful in 7s
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Integration Tests / test-service-integration (push) Successful in 2m58s
Python Tests / test-python (push) Successful in 22s
Security Scanning / security-scan (push) Has been cancelled

Changed 'error' to 'exc' in logger.extra dictionaries to avoid
Logger._log() errors. Fixed in readiness check and marketplace_gpu router.
This commit is contained in:
aitbc
2026-05-03 22:58:52 +02:00
parent a2ceca3cda
commit ae9623c4ea
2 changed files with 2 additions and 2 deletions

View File

@@ -538,7 +538,7 @@ def create_app() -> FastAPI:
"python_version": f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}",
}
except Exception as e:
logger.error("Readiness check failed", extra={"error": str(e)})
logger.error("Readiness check failed", extra={"exc": str(e)})
return JSONResponse(status_code=503, content={"status": "not ready", "error": "Service not ready"})
return app

View File

@@ -757,7 +757,7 @@ async def add_gpu_review(
# Log error and rollback transaction
logger.error(
f"Failed to add review for GPU {gpu_id}: {str(e)}",
extra={"gpu_id": gpu_id, "error": str(e), "error_type": type(e).__name__},
extra={"gpu_id": gpu_id, "exc": str(e), "error_type": type(e).__name__},
)
# Rollback on error