document-drive 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-drive",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "module": "./src/index.ts",
@@ -78,7 +78,8 @@ export class FilesystemStorage implements IDriveStorage {
78
78
  { encoding: 'utf-8' }
79
79
  );
80
80
  return JSON.parse(content);
81
- } catch {
81
+ } catch (error) {
82
+ console.error(error);
82
83
  throw new Error(`Document with id ${id} not found`);
83
84
  }
84
85
  }
@@ -120,8 +121,8 @@ export class FilesystemStorage implements IDriveStorage {
120
121
  let document: Document;
121
122
  try {
122
123
  document = await this.getDocument(FilesystemStorage.DRIVES_DIR, id);
123
- } catch (error) {
124
- throw new Error(`Drive with id ${id} not found: ${error}`);
124
+ } catch {
125
+ throw new Error(`Drive with id ${id} not found`);
125
126
  }
126
127
  if (isDocumentDrive(document)) {
127
128
  return document;