Skip to content

BUG-007: Enhance MCP client error handling in Figma tools #127

@superfluidic

Description

@superfluidic

Description

MCP client error handling in Figma tools uses simple try/except that might not handle all error cases comprehensively.

Location

File: amplifier/crews/tools/figma_tools.py:71-82

Issue

Current implementation uses basic exception handling:

try:
    result = await client.call_tool(...)
except Exception as e:
    raise RuntimeError(f"Figma MCP error: {e}")

This might not provide clear error messages for specific MCP failure scenarios:

  • Connection timeouts
  • Authentication failures
  • Rate limiting
  • Malformed responses
  • Network errors

Impact

Priority: Low (non-blocking)

Users may see cryptic errors if MCP connection fails, making troubleshooting harder.

Suggested Enhancement

Add specific error handling for common MCP failure cases:

  • Timeout errors → suggest checking MCP server status
  • Auth errors → suggest checking FIGMA_ACCESS_TOKEN
  • Network errors → suggest checking connectivity
  • Parse errors → log raw response for debugging

References

  • Bug list: ai_working/ddd/bug_list.md
  • Implementation summary: ai_working/ddd/IMPLEMENTATION_SUMMARY.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions