fix: log exceptions in mcp_handler
Some checks are pending
Check Python Version Consistency / Check Python Version (push) Waiting to run
Some checks are pending
Check Python Version Consistency / Check Python Version (push) Waiting to run
This commit is contained in:
parent
637d3a2811
commit
5d156642b2
|
|
@ -17,7 +17,7 @@ import logging
|
|||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
app = FastAPI(title="opax-mcp", version="3.0.1")
|
||||
app = FastAPI(title="opax-mcp", version="3.0.2")
|
||||
|
||||
OPAX_BASE_URL = os.environ.get("OPAX_BASE_URL", "https://opax.vauco.no")
|
||||
OPAX_IAP_CLIENT_ID = os.environ.get("OPAX_IAP_CLIENT_ID", "")
|
||||
|
|
@ -285,6 +285,7 @@ async def mcp_handler(request: Request):
|
|||
try:
|
||||
result = await handler(tool_args)
|
||||
except Exception as e:
|
||||
logger.error(f"[MCP HANDLER ERROR] {type(e).__name__}: {e}")
|
||||
return JSONResponse(_jsonrpc_err(req_id, -32000, str(e)))
|
||||
|
||||
return JSONResponse(_jsonrpc_ok(req_id, {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user