Skip to content

Commit

Permalink
Update lib/IAMClient.js
Browse files Browse the repository at this point in the history
Co-authored-by: Francois Ferrand <[email protected]>
  • Loading branch information
benzekrimaha and francoisferrand authored May 2, 2024
1 parent 3dcfaad commit 7233c44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/IAMClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ class VaultClient {
quotaMax: quota,
};
const quotaIsValid = typeof quota === 'number' && !Number.isNaN(Number.parseInt(quota, 10)) && quota > 0;
assert(!this.parameterValidation || quotaIsValid, 'Quota must be a strictly positive number');
if (accountName) {
assert(!this.parameterValidation || typeof accountName === 'string',
assert(!this.parameterValidation || quotaIsValid, 'Quota must be a strictly positive number');
if (accountName) {
assert(!this.parameterValidation || typeof accountName === 'string',
'the account name, if set, should be a string');
data.AccountName = accountName;
}
Expand Down

0 comments on commit 7233c44

Please sign in to comment.