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
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user