Skip to content

Fix: document errors, add idempotency, fix pagination, and unify error shapes - #157

Open
amandasmyths wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
amandasmyths:fixes/all-issues
Open

Fix: document errors, add idempotency, fix pagination, and unify error shapes#157
amandasmyths wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
amandasmyths:fixes/all-issues

Conversation

@amandasmyths

Copy link
Copy Markdown

Summary

This PR addresses 4 interconnected issues around API documentation, idempotency, and error handling:

Test plan

  • ✅ All existing unit tests pass (18 tests)
  • ✅ All existing e2e tests pass (25 tests including 2 new tests)
  • ✅ New test for pagination limit validation
  • ✅ New test for idempotency key deduplication
  • ✅ Linting passes
  • ✅ Type checking passes

Changes

  • Added @apiresponse decorators to all IntentsController methods
  • Added idempotencyKey field to CreateIntentDto with 24-hour TTL deduplication
  • Changed pagination limit validation to throw 400 instead of clamping
  • Unified HttpExceptionFilter to ensure consistent error response shapes
  • Updated tests to cover new behavior

closes #75
closes #76
closes #77
closes #78

feat: add idempotency key support to intent creation
fix: return 400 for pagination limits exceeding maximum
fix: unify error response shape across all exception types

- Add @apiresponse decorators to all IntentsController routes documenting
  the specific HTTP exceptions they can throw (404, 409, 403, 410, 400)
- Support optional idempotencyKey field in CreateIntentDto to deduplicate
  requests within a 24-hour TTL window
- Validate pagination limit parameter and reject requests with limit > 100
  with a 400 response instead of silently clamping
- Standardize HttpExceptionFilter to ensure all error responses follow
  the unified { error: string, details?: unknown } shape
- Add tests for pagination limit validation and idempotency deduplication

closes stellar-vortex-protocol#75
closes stellar-vortex-protocol#76
closes stellar-vortex-protocol#77
closes stellar-vortex-protocol#78
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@amandasmyths Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant