Skip to content

Conversation

@apetraru-uipath
Copy link
Contributor

Handle Guardrail Validation Reason

Summary

Updated _create_validation_command to properly handle guardrail validation reason with strict typing.

Changes

  • Strict type annotation: Function parameter now uses GuardrailValidationResult type instead of untyped result
  • Parameter rename: Changed result to guardrail_result to avoid confusion with the result attribute
  • Simplified logic: Removed unnecessary fallback handling, now directly accesses guardrail_result.reason

Benefits

  • Type safety: Strict typing ensures correct usage and better IDE support
  • Clearer code: More descriptive parameter name and direct access to reason field
  • Proper handling: Validation reason is now properly extracted and passed to the command

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