Skip to content

Commit 96243e5

Browse files
authored
fix: issueAfterReset and Grants used together error (#3609)
1 parent 66511f3 commit 96243e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

openmeter/entitlement/driver/v2/mapping.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,9 @@ func ParseAPICreateInputV2(inp *api.EntitlementV2CreateInputs, ns string, usageA
282282

283283
switch {
284284
case issueAmount != nil && len(lo.FromPtr(v.Grants)) != 0:
285-
return entCreateInp, grantsInp, errors.New("issueAfterReset and grants cannot be used together")
285+
return entCreateInp, grantsInp, models.NewGenericValidationError(
286+
errors.New("issueAfterReset and grants cannot be used together"),
287+
)
286288
case issueAmount != nil:
287289
entCreateInp.IssueAfterReset = issueAmount
288290
entCreateInp.IssueAfterResetPriority = issuePriority

0 commit comments

Comments
 (0)