🛠 Fixes for GraphQL related schema changes

This commit is contained in:
2026-02-17 12:05:28 -05:00
parent 136a7f494f
commit cd446a9ca3
8 changed files with 894 additions and 195 deletions

View File

@@ -174,14 +174,16 @@ export const getMimeType = async (filePath: string) => {
*/
export const createDirectory = async (options: any, directoryPath: string) => {
try {
await fse.ensureDir(directoryPath, options);
await fse.ensureDir(directoryPath);
console.info(`Directory [ %s ] was created.`, directoryPath);
} catch (error) {
const errMsg = error instanceof Error ? error.message : String(error);
console.error(`Failed to create directory [ ${directoryPath} ]:`, error);
throw new Errors.MoleculerError(
"Failed to create directory",
`Failed to create directory: ${directoryPath} - ${errMsg}`,
500,
"FileOpsError",
error
{ directoryPath, originalError: errMsg }
);
}
};