Skip to content

Commit ec76b05

Browse files
committed
Forcing reset on errors
1 parent fdbc666 commit ec76b05

7 files changed

Lines changed: 15 additions & 13 deletions

File tree

.eslintrc.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ overrides:
3232
- '**/*.d.ts'
3333
rules:
3434
# declaration files often have forward refs and unused imports for typing only
35-
'@typescript-eslint/no-unused-vars': off
3635
no-use-before-define: off
3736
'@typescript-eslint/no-use-before-define': off
3837
# allow {} in generated/handwritten d.ts where compatible with runtime

docs/hds-lib.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/hds-lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/tests-browser.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21012,14 +21012,16 @@ class AppClientAccount extends Application {
2101221012
const collectorClient = this.cache.collectorClientsMap[collectorClientKey];
2101321013
logger.debug('AppClient:handleIncomingRequest found existing', { collectorClient });
2101421014
if (collectorClient.requesterApiEndpoint !== apiEndpoint) {
21015-
throw new HDSLibError('Found existing collectorClient with a different apiEndpoint', { actual: collectorClient.requesterApiEndpoint, incoming: apiEndpoint });
21015+
console.log('⚠️⚠️⚠️⚠️ RESET! Found existing collectorClient with a different apiEndpoint', { actual: collectorClient.requesterApiEndpoint, incoming: apiEndpoint });
21016+
// throw new HDSLibError('Found existing collectorClient with a different apiEndpoint', { actual: collectorClient.requesterApiEndpoint, incoming: apiEndpoint });
2101621017
// we might consider reseting() in the future;
21017-
// return await collectorClient.reset(apiEndpoint, incomingEventId, accessInfo);
21018+
return await collectorClient.reset(apiEndpoint, incomingEventId, accessInfo);
2101821019
}
2101921020
if (incomingEventId && collectorClient.requesterEventId !== incomingEventId) {
21020-
throw new HDSLibError('Found existing collectorClient with a different eventId', { actual: collectorClient.requesterEventId, incoming: incomingEventId });
21021+
// throw new HDSLibError('Found existing collectorClient with a different eventId', { actual: collectorClient.requesterEventId, incoming: incomingEventId });
21022+
console.log('⚠️⚠️⚠️⚠️ RESET! Found existing collectorClient with a different eventId', { actual: collectorClient.requesterEventId, incoming: incomingEventId });
2102121023
// we might consider reseting() in the future;
21022-
// return await collectorClient.reset(apiEndpoint, incomingEventId, accessInfo);
21024+
return await collectorClient.reset(apiEndpoint, incomingEventId, accessInfo);
2102321025
}
2102421026
return collectorClient;
2102521027
}

docs/tests-browser.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/appTemplates/AppClientAccount.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ class AppClientAccount extends Application {
4242
const collectorClient = this.cache.collectorClientsMap[collectorClientKey];
4343
logger.debug('AppClient:handleIncomingRequest found existing', { collectorClient });
4444
if (collectorClient.requesterApiEndpoint !== apiEndpoint) {
45-
throw new HDSLibError('Found existing collectorClient with a different apiEndpoint', { actual: collectorClient.requesterApiEndpoint, incoming: apiEndpoint });
45+
console.log('⚠️⚠️⚠️⚠️ RESET! Found existing collectorClient with a different apiEndpoint', { actual: collectorClient.requesterApiEndpoint, incoming: apiEndpoint });
46+
// throw new HDSLibError('Found existing collectorClient with a different apiEndpoint', { actual: collectorClient.requesterApiEndpoint, incoming: apiEndpoint });
4647
// we might consider reseting() in the future;
47-
// return await collectorClient.reset(apiEndpoint, incomingEventId, accessInfo);
48+
return await collectorClient.reset(apiEndpoint, incomingEventId, accessInfo);
4849
}
4950
if (incomingEventId && collectorClient.requesterEventId !== incomingEventId) {
50-
throw new HDSLibError('Found existing collectorClient with a different eventId', { actual: collectorClient.requesterEventId, incoming: incomingEventId });
51+
// throw new HDSLibError('Found existing collectorClient with a different eventId', { actual: collectorClient.requesterEventId, incoming: incomingEventId });
52+
console.log('⚠️⚠️⚠️⚠️ RESET! Found existing collectorClient with a different eventId', { actual: collectorClient.requesterEventId, incoming: incomingEventId });
5153
// we might consider reseting() in the future;
52-
// return await collectorClient.reset(apiEndpoint, incomingEventId, accessInfo);
54+
return await collectorClient.reset(apiEndpoint, incomingEventId, accessInfo);
5355
}
5456
return collectorClient;
5557
}

types/appTemplates/Application.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pryv = require('pryv');
2-
import type AppClientAccount from './AppClientAccount';
32
export = Application;
43
/**
54
* Settings for application

0 commit comments

Comments
 (0)