Skip to content

fix(cad): surface Zoo error detail in CAD generation rejections - #44

Merged
alanshen27 merged 1 commit into
mainfrom
devin/1785971289-surface-zoo-error
Aug 5, 2026
Merged

fix(cad): surface Zoo error detail in CAD generation rejections#44
alanshen27 merged 1 commit into
mainfrom
devin/1785971289-surface-zoo-error

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

text_to_cad multi-part generations report every failing part as:

<part>: The CAD generation service rejected the request.

The Zoo WebSocket error frame actually carries detail (and sometimes error_code / request_id), but errorDetail() in packages/cad/src/zookeeper.ts was collapsing it to the generic string regardless of the payload.

Changes

  • errorDetail() now extracts error string / detail / message and includes code= / request_id= metadata.
  • Falls back to a bounded JSON dump for unknown error shapes instead of swallowing them.
  • Exports errorDetail() and adds unit tests for string errors, object details, code/request_id metadata, long-value truncation, and the fallback generic message.

This makes enclosure_shell, rear_cover, kickstand, etc. failures actionable instead of opaque — the next rejection will show the actual Zoo reason (e.g. quota, unsupported geometry, bad request).

Link to Devin session: https://app.devin.ai/sessions/d846e91524fc43aca04de9649aeb2300
Requested by: @alanshen27

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@alanshen27 alanshen27 self-assigned this Aug 5, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@alanshen27
alanshen27 merged commit 40c8e47 into main Aug 5, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant