diff --git a/package.json b/package.json index ffa68ef..2cb804b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@csbnlu/jawks-private-keys-provisioner", - "version": "0.0.16", + "version": "0.0.17", "devDependencies": { "@types/aws-lambda": "^8.10.143", "@types/luxon": "^3.4.2", diff --git a/src/bin/provision-private-keys.mts b/src/bin/provision-private-keys.mts index 87a567b..41c041d 100644 --- a/src/bin/provision-private-keys.mts +++ b/src/bin/provision-private-keys.mts @@ -41,7 +41,12 @@ const environmentConfigSchema = z.object({ if (value === undefined) { return undefined; } - return parseInt(value); + const parsedValue = parseInt(value); + if (isNaN(parsedValue)) { + console.error("Invalid privateKeysRefreshIntervalInDays"); + return undefined; + } + return parsedValue; }), });