MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _build_gemini_error_response_from_handler

Function _build_gemini_error_response_from_handler

src/api/routes.py:545–552  ·  view source on GitHub ↗
(payload: Dict[str, Any])

Source from the content-addressed store, hash-verified

543
544
545def _build_gemini_error_response_from_handler(payload: Dict[str, Any]) -> JSONResponse:
546 error = payload.get("error", {})
547 status_code = _get_error_status_code(payload)
548 message = error.get("message", "Generation failed")
549 return JSONResponse(
550 status_code=status_code,
551 content=_build_gemini_error_payload(status_code, message),
552 )
553
554
555def _extract_openai_message_content(payload: Dict[str, Any]) -> str:

Callers 1

generate_contentFunction · 0.85

Calls 2

_get_error_status_codeFunction · 0.85

Tested by

no test coverage detected