[Bounty proposal] fix(frankfurter-app): exception text leaks into chat tool responses across 3 endpoints ($50 proposed)
Following the contribution guide's invitation to propose paid work — @kodjima33, @josancamon19, would a US$50 bounty be appropriate for this? Proposed amount, not an existing award.
Product impact
• Primary loop layer: Security [✓] Internal host/network details reflected into chat tool responses (broken trust in the tool loop)
Symptom
plugins/omi-frankfurter-app returns raw exception strings ({exc}) to callers, reflecting internal socket errors, DNS resolver output, and host details into the chat-tool responses the OMI backend hands to the model/client:
• POST /tools/convert_currency returns ChatToolResponse(error=f"currency conversion failed: {exc}")
• POST /tools/get_latest_rates returns ChatToolResponse(error=f"latest rates request failed: {exc}")
• POST /tools/list_supported_currencies returns ChatToolResponse(error=f"currency list request failed: {exc}")
A transport failure such as httpx.ConnectError("[Errno -2] Name or service not known … via resolver 10.0.2.15 from host omi-plugins-…") is reflected verbatim.
Fix (PR #22979)
All three endpoints now return clean, fixed messages while preserving specific mappings:
- HTTP 429 → rate-limit message; 5xx → temporarily unavailable; other statuses →
HTTP {status}(no exception text) json.JSONDecodeError→ "the Frankfurter API returned an invalid response"ValueErrorstays interpolated: every ValueError in this app is a fixed, code-controlled validation string (pinned by tests)- unexpected exceptions → generic "failed. Please try again later."
Tests
test_error_handling.py (hermetic, stdlib-only, _request_json seam): 10 tests — transport sanitization for all 3 endpoints, HTTP status mappings (429/503/422), unexpected-exception containment, JSON-decode handling, ValueError preservation, happy path. Registered in .github/checks-manifest.yaml as omi-frankfurter-error-handling-tests. Existing test_main.py updated where it pinned the old leak ("currency conversion failed: Network down" assertion).
Precedent
Same failure class as CoinGecko (#15522), Google Calendar (#15493), Shopify (#15484 / #15485), ClickUp (#15361 / #15360), Slack (#15471 / #15469), Whoop (#15477 / #15476), and arXiv app (#15587) hardening.
Disclosed: authored with AI assistance (Z.ai agent swarm).
Bounty Payout Destination (EVM - Base Mainnet): 0x8c43E78E866258357A4c73610f62eEeda951002D
PR: #22979
Thanks for putting this together. We aren't doing bounties at the moment, so we're closing the bounty proposal issues for now — thanks for the fix! 🙏