MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / v2_developer_errors

Function v2_developer_errors

app/api/agentops/api/routes/v2.py:705–742  ·  view source on GitHub ↗
(request: Request, supabase: AsyncSupabaseClient)

Source from the content-addressed store, hash-verified

703
704@router.post("/developer_errors")
705async def v2_developer_errors(request: Request, supabase: AsyncSupabaseClient):
706 try:
707 data = await request.json()
708 logger.debug(data)
709
710 developer_error = {
711 "api_key": request.headers.get("X-Agentops-Api-Key"),
712 "sdk_version": data.get("sdk_version", None),
713 "type": data.get("type", None),
714 "message": data.get("message", None),
715 "stack_trace": data.get("stack_trace", None),
716 "host_env": data.get("host_env", None),
717 }
718
719 await supabase.table("developer_errors").insert(developer_error).execute()
720 logger.info(
721 colored(
722 f"Completed request request for API Key: {request.headers.get('X-Agentops-Api-Key')}",
723 "yellow",
724 )
725 )
726 return JSONResponse("", status_code=204)
727 except RuntimeError as e:
728 try:
729 data = await request.json()
730 logger.error(f"{request.url.path}: Error posting developer_error: {e} Data received: {data}")
731 except Exception as log_error:
732 logger.error(
733 f"{request.url.path}: Error posting developer_error: {e} Could not read data: {log_error}"
734 )
735
736 return JSONResponse(
737 {
738 "path": request.url.path,
739 "message": f"Error posting developer_error: {e}",
740 },
741 status_code=400,
742 )
743
744
745@router.get("/sessions/{session_id}/stats")

Callers

nothing calls this directly

Calls 3

jsonMethod · 0.80
insertMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…