debug: log URL before API call
All checks were successful
Build and Push Monarch MCP Docker Image / build (push) Successful in 20s

This commit is contained in:
2026-05-05 02:59:31 +00:00
parent 1eb8eaacb2
commit 44b2f553d6
2 changed files with 6 additions and 2 deletions

View File

@@ -55,8 +55,7 @@ async def get_authenticated_client() -> MonarchMoney:
token = load_token()
if token:
try:
_client_instance = MonarchMoney()
_client_instance.set_token(token)
_client_instance = MonarchMoney(token=token)
return _client_instance
except Exception as e:
logger.error(f"Failed to initialize MonarchMoney with token: {e}")

View File

@@ -303,6 +303,11 @@ async def api_call(method: str, params: str = "{}") -> str:
parsed_params = json.loads(params) if params else {}
except json.JSONDecodeError as e:
return serialize_json({"error": f"Invalid JSON in params: {e}"})
# Debug: log what URL the client will use
from monarchmoney import MonarchMoneyEndpoints
logger.info(f"api_call: method={method}, GraphQL URL={MonarchMoneyEndpoints.getGraphQL()}")
try:
result = await method_func(**parsed_params)
return serialize_json(result)