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:
parent
f6db981600
commit
8870f9cef0
1 changed files with 1 additions and 9 deletions
|
@ -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'));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue