Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions connector_builder_mcp/_connector_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
SyncMode,
)
from fastmcp import FastMCP
from jsonschema.exceptions import ValidationError
from pydantic import BaseModel, Field

from connector_builder_mcp._secrets import hydrate_config, register_secrets_tools
Expand Down Expand Up @@ -120,6 +121,9 @@ def validate_manifest(
else:
errors.append("Failed to resolve manifest")

except ValidationError as e:
logger.error(f"JSON schema validation error: {e}")
errors.append(f"JSON schema validation failed: {str(e)}")
Copy link

Copilot AI Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new ValidationError exception handler should be placed before the generic Exception handler but after any other specific exceptions. Consider whether other specific CDK exceptions should also be handled explicitly to provide better error messages.

Suggested change
errors.append(f"JSON schema validation failed: {str(e)}")
errors.append(f"JSON schema validation failed: {str(e)}")
except AirbyteTracedException as e:
logger.error(f"Airbyte CDK traced exception: {e}")
errors.append(f"Airbyte CDK error: {str(e)}")

Copilot uses AI. Check for mistakes.

except Exception as e:
logger.error(f"Error validating manifest: {e}")
errors.append(f"Validation error: {str(e)}")
Expand Down
Loading