Merge branch 'dev' into 'main'
refactor: ♻️ improve readDriectory function
See merge request zyner/xyter/bot!2
This commit is contained in:
commit
9e8d65c048
1 changed files with 3 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue