fix(models): accept int or str for TaskResult.error_code #1

Merged
brad merged 1 commit from :fix/error-code-type into main 2026-02-06 23:38:12 -08:00
Contributor

The midapi.ai API returns integer error codes (e.g. 400) not strings. Pydantic validation was failing when parsing error responses.

Tested: Image generation now works through the MCP proxy HTTP wrapper.

The midapi.ai API returns integer error codes (e.g. 400) not strings. Pydantic validation was failing when parsing error responses. **Tested:** Image generation now works through the MCP proxy HTTP wrapper.
The midapi.ai API returns integer error codes (e.g. 400) not strings.
Pydantic validation was failing when parsing error responses.

Tested: Image generation now works through the HTTP wrapper.
brad merged commit e41e007850 into main 2026-02-06 23:38:12 -08:00
brad deleted branch fix/error-code-type 2026-02-06 23:38:48 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
brad/claude-midjourney-mcp!1
No description provided.