Поставил HTML по дефолту
This commit is contained in:
@@ -26,7 +26,7 @@ TraceResponseFormat = Literal["json", "text", "html"]
|
||||
class TraceQueryRequest:
|
||||
levels: tuple[TraceLevel, ...] = ("ERROR", "WARNING", "INFO")
|
||||
include_attrs_json: bool = False
|
||||
response_format: TraceResponseFormat = "text"
|
||||
response_format: TraceResponseFormat = "html"
|
||||
|
||||
|
||||
TraceLookupHandler = Callable[[str, TraceQueryRequest], Awaitable[TraceLogView]]
|
||||
|
||||
@@ -14,7 +14,7 @@ from app_runtime.contracts.trace import TraceLevel, TraceLogRecord, TraceLogView
|
||||
class TraceRequestParser:
|
||||
def parse(self, request: Request) -> TraceQueryRequest:
|
||||
raw_levels = request.query_params.get("levels")
|
||||
raw_format = request.query_params.get("format", "text")
|
||||
raw_format = request.query_params.get("format", "html")
|
||||
response_format = raw_format.strip().lower()
|
||||
if response_format not in {"json", "text", "html"}:
|
||||
raise ValueError(f"unsupported trace format: {raw_format}")
|
||||
|
||||
Reference in New Issue
Block a user