Skip to content

fix(validation): use stable error codes across policy and payment routes (#257) - #303

Closed
lmduy2612 wants to merge 1 commit into
Fortexa-stellar:mainfrom
lmduy2612:fix/issue-257-stable-validation-error-codes
Closed

lmduy2612 wants to merge 1 commit into
Fortexa-stellar:mainfrom
lmduy2612:fix/issue-257-stable-validation-error-codes

Conversation

@lmduy2612

Copy link
Copy Markdown

Closes #257.

Summary of Changes

  • Standardizes API validation error codes across policy evaluation and payment execution endpoints.
  • Adds enum-backed error code contracts and regression tests.

…tes (Fortexa-stellar#257)

- Define VALIDATION_ERROR_CODES: MISSING_FIELD, INVALID_AMOUNT, INVALID_ASSET, INVALID_MEMO, INVALID_PAYLOAD
- Return stable error codes and HTTP 400 across /api/policy, /api/decision, /api/stellar/build-payment, and /api/stellar/submit-signed
- Redact sensitive values and prevent leaking raw payloads in validation errors
- Maintain cross-route validation code parity
- Add stable error codes test suite covering parity, status codes, and redaction
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.

Use one stable error code for the same failure on policy and payment routes

2 participants