fix: add graceful error handling for get_budgets API errors
All checks were successful
Build and Push Monarch MCP Docker Image / build (push) Successful in 16s

Returns informative error message when Monarch Money API fails,
which may occur if budgets are not configured in the account.
This commit is contained in:
Ben
2025-12-25 04:20:39 +00:00
parent 4a309cbfb3
commit a229537599
6 changed files with 87 additions and 4 deletions

11
uv.lock generated
View File

@@ -913,6 +913,7 @@ dependencies = [
{ name = "mcp", extra = ["cli"] },
{ name = "monarchmoney" },
{ name = "pydantic" },
{ name = "pyotp" },
{ name = "python-dotenv" },
{ name = "starlette" },
{ name = "uvicorn" },
@@ -925,6 +926,7 @@ requires-dist = [
{ name = "mcp", extras = ["cli"], specifier = ">=1.0.0" },
{ name = "monarchmoney", specifier = ">=0.1.15" },
{ name = "pydantic", specifier = ">=2.0.0" },
{ name = "pyotp", specifier = ">=2.9.0" },
{ name = "python-dotenv", specifier = ">=1.0.0" },
{ name = "starlette", specifier = ">=0.35.0" },
{ name = "uvicorn", specifier = ">=0.27.0" },
@@ -1485,6 +1487,15 @@ crypto = [
{ name = "cryptography" },
]
[[package]]
name = "pyotp"
version = "2.9.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/f3/b2/1d5994ba2acde054a443bd5e2d384175449c7d2b6d1a0614dbca3a63abfc/pyotp-2.9.0.tar.gz", hash = "sha256:346b6642e0dbdde3b4ff5a930b664ca82abfa116356ed48cc42c7d6590d36f63", size = 17763, upload-time = "2023-07-27T23:41:03.295Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/c3/c0/c33c8792c3e50193ef55adb95c1c3c2786fe281123291c2dbf0eaab95a6f/pyotp-2.9.0-py3-none-any.whl", hash = "sha256:81c2e5865b8ac55e825b0358e496e1d9387c811e85bb40e71a3b29b288963612", size = 13376, upload-time = "2023-07-27T23:41:01.685Z" },
]
[[package]]
name = "pyperclip"
version = "1.11.0"