fix: correct datetime.UTC usage in exceptions.py
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Successful in 10s
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
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Has started running

Changed datetime.now(datetime.UTC) to datetime.now(UTC) since UTC
is imported separately. This fixes AttributeError when error
responses are generated.
This commit is contained in:
aitbc
2026-05-03 22:55:40 +02:00
parent 4af62c3ed5
commit 38e767bdec

View File

@@ -22,7 +22,7 @@ class ErrorResponse(BaseModel):
"""Standardized error response for all API errors."""
error: dict[str, Any] = Field(..., description="Error information")
timestamp: str = Field(default_factory=lambda: datetime.now(datetime.UTC).isoformat() + "Z")
timestamp: str = Field(default_factory=lambda: datetime.now(UTC).isoformat() + "Z")
request_id: str | None = Field(None, description="Request ID for tracing")
class Config: