Skip to content

fix: surface Motion API error message on 404 responses#94

Open
david-fold-studio wants to merge 1 commit intodevondragon:mainfrom
david-fold-studio:fix/surface-api-error-message-on-404
Open

fix: surface Motion API error message on 404 responses#94
david-fold-studio wants to merge 1 commit intodevondragon:mainfrom
david-fold-studio:fix/surface-api-error-message-on-404

Conversation

@david-fold-studio
Copy link

Summary

  • For 404 errors, prefer the actual Motion API error message (e.g. "Unknown user schedule: Work Hours Plus") over the generic "The requested resource was not found"
  • Existing behavior preserved for 404s without an API message
  • Split the 404 error test into two cases covering both paths

Context

When updating a task with autoScheduled, the Motion API can return a 404 with a specific message like "Unknown user schedule: X". The MCP was replacing this with a generic message, making it hard to diagnose the issue.

Test plan

  • All 453 unit tests pass
  • Verified 404 with API message surfaces the actual message
  • Verified 404 without API message falls back to generic "not found"

🤖 Generated with Claude Code

Previously, all 404 errors showed a generic "The requested resource was
not found" message, hiding the actual API response (e.g. "Unknown user
schedule: Work Hours Plus"). Now 404s prefer the API message when
available, making errors actionable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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