Skip to content

Commit d3be9b9

Browse files
committed
Catch auth errors
1 parent 43361c4 commit d3be9b9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/src/services/repo.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { Vaultifier, VaultMinMeta, VaultPostItem } from 'vaultifier/dist/main';
1+
import { Vaultifier, VaultMinMeta, VaultPostItem, parsePostResult } from 'vaultifier/dist/main';
22
import { Cache } from './cache';
33
import { logger } from './logger';
4-
import { parsePostResult } from 'vaultifier';
54

65
// const DEFAULT_REPO = 'http://localhost:8080';
76
export const DEFAULT_REPO = 'https://soya.ownyourdata.eu';
@@ -72,7 +71,12 @@ export class RepoService {
7271
if (!v) {
7372
logger.debug(`Initializing vaultifier: ${this.repo}`);
7473
this._vaultifier = v = new Vaultifier(this.repo);
75-
await v.initialize();
74+
try {
75+
await v.initialize();
76+
// catch all errors that arise due to authentication issues
77+
// currently we don't care about these errors
78+
// as most things in soya are not authenticated
79+
} catch { }
7680
}
7781

7882
return v;

0 commit comments

Comments
 (0)