Skip to content

Conversation

@jimsynz
Copy link
Contributor

@jimsynz jimsynz commented Dec 30, 2025

Summary

  • Replace tuple-based error returns in BB.Command.MoveTo with structured BB.Error types
  • Add new BB.Error.Kinematics.MultiFailed error type for multi-target IK failures
  • Use existing BB.Error.Invalid.Command for missing parameter errors

Changes

Old Pattern New Pattern
{:error, {:missing_parameter, key}} {:error, %BB.Error.Invalid.Command{...}}
{:error, {:ik_failed, link, error, results}} {:error, %BB.Error.Kinematics.MultiFailed{...}}

Test plan

  • All existing tests updated and passing
  • mix check --no-retry passes

Replace tuple-based error returns with structured BB.Error types:
- `{:missing_parameter, key}` → `BB.Error.Invalid.Command`
- `{:ik_failed, ...}` → `BB.Error.Kinematics.MultiFailed`

This provides consistent error handling with severity levels and
better error messages across the codebase.
@jimsynz jimsynz merged commit 946f445 into main Dec 30, 2025
14 checks passed
@jimsynz jimsynz deleted the structured-errors branch December 30, 2025 06:54
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.

2 participants