179
func (v *CommandAttrValidator) ValidateTimerCancelAttributes(
180
attributes *commandpb.CancelTimerCommandAttributes,
182
>
183
>
const failedCause = enumspb.WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES
184
>
if attributes == nil {
185
return failedCause, serviceerror.NewInvalidArgument("CancelTimerCommandAttributes is not set on CancelTimerCommand.")
186
}
187
189
>
190
>
if timerID == "" {
191
return failedCause, serviceerror.NewInvalidArgument("TimerId is not set on CancelTimerCommand.")
192
}
194
return failedCause, serviceerror.NewInvalidArgumentf("TimerId on CancelTimerCommand exceeds length limit. TimerId=%s Length=%d Limit=%d", timerID, len(timerID), v.maxIDLengthLimit)
195
}
197
}
198