MCPcopy
hub / github.com/openai/gpt-oss / log_validation_error

Function log_validation_error

gpt_oss/responses_api/api_server.py:106–115  ·  view source on GitHub ↗
(request: Request, exc: RequestValidationError)

Source from the content-addressed store, hash-verified

104
105 @app.exception_handler(RequestValidationError)
106 async def log_validation_error(request: Request, exc: RequestValidationError):
107 try:
108 body_bytes = await request.body()
109 print(
110 "Invalid request body received:"
111 f" {body_bytes.decode('utf-8', errors='replace')}"
112 )
113 except Exception as body_exc:
114 print(f"Failed to read invalid request body: {body_exc}")
115 return await request_validation_exception_handler(request, exc)
116 responses_store: dict[str, tuple[ResponsesRequest, ResponseObject]] = {}
117
118 def generate_response(

Callers

nothing calls this directly

Calls 1

printFunction · 0.85

Tested by

no test coverage detected