Skip to content

Commit

Permalink
Expose invalid timer value in the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
demirkayaender committed Aug 18, 2021
1 parent f621c7c commit 0c7cd49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion service/history/decision/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ func (v *attrValidator) validateTimerScheduleAttributes(
return &types.BadRequestError{Message: "TimerId exceeds length limit."}
}
if attributes.GetStartToFireTimeoutSeconds() <= 0 {
return &types.BadRequestError{Message: "A valid StartToFireTimeoutSeconds is not set on decision."}
return &types.BadRequestError{
Message: fmt.Sprintf("Invalid StartToFireTimeoutSeconds: %v", attributes.GetStartToFireTimeoutSeconds()),
}
}
return nil
}
Expand Down

0 comments on commit 0c7cd49

Please sign in to comment.