Explorar o código

Output error if bucket.delete fails

Martin Filser %!s(int64=3) %!d(string=hai) anos
pai
achega
dd0d5dbe9f
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      models/lib/fsHooks/createOnAfterRemove.js

+ 1 - 0
models/lib/fsHooks/createOnAfterRemove.js

@@ -7,6 +7,7 @@ export const createOnAfterRemove =
     if (gridFsFileId) {
       const gfsId = createObjectId({ gridFsFileId });
         bucket.delete(gfsId, err => {
+          console.error("error on gfs bucket.delete: ", err);
       });
     }
   };