Skip to content

Commit 55a1776

Browse files
committed
fix: use maxRandomPasswordLength constant in error message instead of hardcoded 4096
1 parent 7165821 commit 55a1776

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/services/secretsmanager/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ func (p *Provider) getRandomPassword(params map[string]any) (*plugin.Response, e
434434
length := 32
435435
if l, ok := params["PasswordLength"].(float64); ok {
436436
if l <= 0 || l > maxRandomPasswordLength {
437-
return smError("InvalidParameterException", "PasswordLength must be between 1 and 4096", http.StatusBadRequest), nil
437+
return smError("InvalidParameterException", fmt.Sprintf("PasswordLength must be between 1 and %d", maxRandomPasswordLength), http.StatusBadRequest), nil
438438
}
439439
length = int(l)
440440
}

0 commit comments

Comments
 (0)