Merge branch 'dev' into 'main'

refactor: ♻️ improve readDriectory function

See merge request zyner/xyter/bot!2
This commit is contained in:
Axel Olausson Holtenäs 2023-10-01 15:20:04 +00:00
commit 9e8d65c048

View file

@ -14,11 +14,8 @@ export default async (filePath: string) => {
});
return result;
} catch (error) {
logger.error({
message: `Error checking directory ${filePath}`,
error,
directoryPath,
});
throw new Error(`Error checking directory ${filePath}: ${error}`);
const errorMessage = `Error checking directory ${filePath}: ${error}`;
logger.error({ message: errorMessage, error, directoryPath });
throw new Error(errorMessage);
}
};