Fix EACCES error code name

This commit is contained in:
David Sanders 2022-12-11 20:09:30 -08:00 committed by Jamie Kyle
parent 58d53527e0
commit 16c9c17cc2
2 changed files with 2 additions and 2 deletions

View file

@ -75,7 +75,7 @@ async function doGracefulRename({
); );
} }
} catch (error) { } catch (error) {
if (error.code !== 'EACCESS' && error.code !== 'EPERM') { if (error.code !== 'EACCES' && error.code !== 'EPERM') {
throw error; throw error;
} }

View file

@ -69,7 +69,7 @@ export function createRotatingPinoDest({
// delay. // delay.
if ( if (
retryCount < MAX_RETRY_COUNT && retryCount < MAX_RETRY_COUNT &&
(error.code === 'EACCESS' || error.code === 'EPERM') (error.code === 'EACCES' || error.code === 'EPERM')
) { ) {
retryCount += 1; retryCount += 1;
warn(`rotatingPinoDest: retrying rotation, retryCount=${retryCount}`); warn(`rotatingPinoDest: retrying rotation, retryCount=${retryCount}`);