0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

chore(core): remove redundant try catch in readPrivateKeys (#1764)

This commit is contained in:
Xiao Yijun 2022-08-11 20:03:29 +08:00 committed by GitHub
parent f6db981600
commit 8870f9cef0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,15 +84,7 @@ export const readPrivateKeys = async (): Promise<string[]> => {
);
}
try {
return privateKeyPaths.map((path): string => readFileSync(path, 'utf8'));
} catch {
throw new Error(
`Failed to read private keys ${listFormatter.format(
privateKeyPaths
)} from env \`OIDC_PRIVATE_KEY_PATHS\`.`
);
}
return privateKeyPaths.map((path): string => readFileSync(path, 'utf8'));
};
/**