Skip to content

feat: Add SeamHttpInvalidInputError.get_validation_error_messages - #616

Merged
razor-x merged 1 commit into
mainfrom
claude/port-validation-error-messages-wb71bs
Aug 13, 2026
Merged

feat: Add SeamHttpInvalidInputError.get_validation_error_messages#616
razor-x merged 1 commit into
mainfrom
claude/port-validation-error-messages-wb71bs

Conversation

@razor-x

@razor-x razor-x commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds the ability to retrieve validation error messages from SeamHttpInvalidInputError exceptions, making it easier for users to access detailed validation feedback from the API.

Key Changes

  • Added List to type imports in exceptions.py
  • Added _validation_errors attribute to SeamHttpInvalidInputError to store validation error details from the API response
  • Implemented get_validation_error_messages(param_name: str) method to retrieve validation error messages for a specific request parameter
  • Updated client.py to extract and pass validation_errors from the API error response to SeamHttpInvalidInputError
  • Added test coverage for retrieving validation messages for both existing and non-existent parameters

Implementation Details

  • The get_validation_error_messages() method returns a list of error messages for a given parameter name, or an empty list if the parameter has no validation errors
  • Validation errors are extracted from the nested structure validation_errors[param_name]["_errors"] in the API response
  • The implementation gracefully handles missing parameters by returning an empty list rather than raising an exception

https://claude.ai/code/session_012RfnESV5b57QDoxMggXdM9

Port the getValidationErrorMessages interface from the JavaScript SDK.
SeamHttpInvalidInputError now carries the validation_errors from the API
error response and exposes get_validation_error_messages(param_name),
which returns the messages for a request parameter or an empty list when
that parameter has none.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012RfnESV5b57QDoxMggXdM9
@razor-x razor-x changed the title Add validation error message retrieval to SeamHttpInvalidInputError feat: Add SeamHttpInvalidInputError.get_validation_error_messages Aug 13, 2026
@razor-x
razor-x marked this pull request as ready for review August 13, 2026 19:20
@razor-x
razor-x requested a review from a team as a code owner August 13, 2026 19:20
@razor-x
razor-x merged commit 921809e into main Aug 13, 2026
23 checks passed
@razor-x
razor-x deleted the claude/port-validation-error-messages-wb71bs branch August 13, 2026 19:20
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