Skip to content

fix: improve API validation error messages with request context#1350

Merged
CaralHsi merged 1 commit intodev-20260323-v2.0.11from
fix/add-more-error-message
Mar 25, 2026
Merged

fix: improve API validation error messages with request context#1350
CaralHsi merged 1 commit intodev-20260323-v2.0.11from
fix/add-more-error-message

Conversation

@CaralHsi
Copy link
Copy Markdown
Collaborator

@CaralHsi CaralHsi commented Mar 25, 2026

Summary

  • Enhanced validation_error_handler in exceptions.py to include request method, path, and human-readable error descriptions in both the response message and server logs
  • Callers can now immediately identify which endpoint failed and what fields are missing, without needing to check server logs

Closes #1349

Test Plan

  • Send POST /product/get_memory with empty body → response message includes POST /product/get_memory: [body] Field required (type: missing)
  • Send POST /product/get_memory with body missing mem_cube_id → response message includes [body -> mem_cube_id] Field required (type: missing)
  • Normal valid requests are not affected

@CaralHsi CaralHsi merged commit 759af30 into dev-20260323-v2.0.11 Mar 25, 2026
32 checks passed
@CaralHsi CaralHsi deleted the fix/add-more-error-message branch April 7, 2026 06:46
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