Problem
Some constructors validate inputs, but several request string fields can still be empty/whitespace/invalid (for example permission, relation, resource_type, subject_type).
Impact
Invalid request values can propagate deeper into execution and fail later with less actionable errors. This increases debugging cost and can produce inconsistent API behavior.
Proposed change
- Add consistent validation for required string fields across request builders/constructors.
- Reject empty, whitespace-only, and structurally invalid values.
- Fail fast with
Error::InvalidArgument and field-specific error messages.
- Add test coverage for valid and invalid inputs across affected request types.
Acceptance criteria
- All required string request fields are validated consistently.
- Empty/whitespace/invalid forms return
Error::InvalidArgument before request dispatch.
- Tests verify both rejection cases and valid pass-through behavior.
Problem
Some constructors validate inputs, but several request string fields can still be empty/whitespace/invalid (for example
permission,relation,resource_type,subject_type).Impact
Invalid request values can propagate deeper into execution and fail later with less actionable errors. This increases debugging cost and can produce inconsistent API behavior.
Proposed change
Error::InvalidArgumentand field-specific error messages.Acceptance criteria
Error::InvalidArgumentbefore request dispatch.