querysub 0.380.0 → 0.382.0

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": "querysub",
3
- "version": "0.380.0",
3
+ "version": "0.382.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -238,7 +238,6 @@ export class IndexedLogs<T> {
238
238
  }
239
239
 
240
240
  for (let callback of this.errorWatchers.values()) {
241
- console.log(blue(`Calling error callback: ${this.config.name}`));
242
241
  try {
243
242
  callback(datum);
244
243
  } catch (e) {
@@ -318,6 +318,8 @@ export async function exposeErrorWatchService() {
318
318
  }
319
319
  }
320
320
 
321
+ console.log(`Watch loop received error, ${suppressed ? "suppressed" : "not suppressed"}, matched suppression id: ${matchedSuppressionId}: ${error.param0}`);
322
+
321
323
  if (suppressed && matchedSuppressionId) {
322
324
  queueDiscordNotification(matchedSuppressionId, 1, false);
323
325
  } else if (!suppressed) {
@@ -328,22 +330,24 @@ export async function exposeErrorWatchService() {
328
330
  unmatchedErrors.push(error);
329
331
  }
330
332
 
331
- const pattern = await generatePatternForError(error);
332
- if (pattern) {
333
- const newEntry: SuppressionEntry = {
334
- id: nextId(),
335
- pattern,
336
- timeout: 0,
337
- createdTime: Date.now(),
338
- lastUpdatedTime: Date.now(),
339
- };
340
-
341
- suppressionCache.push(newEntry);
342
- void suppression.set(newEntry.id, newEntry);
343
- applySuppression(error, newEntry);
344
- queueDiscordNotification(newEntry.id, 1, true);
345
-
346
- void ErrorNotificationService.triggerSuppressionUpdate(newEntry.id);
333
+ if (!matchedSuppressionId) {
334
+ const pattern = await generatePatternForError(error);
335
+ if (pattern) {
336
+ const newEntry: SuppressionEntry = {
337
+ id: nextId(),
338
+ pattern,
339
+ timeout: 0,
340
+ createdTime: Date.now(),
341
+ lastUpdatedTime: Date.now(),
342
+ };
343
+
344
+ suppressionCache.push(newEntry);
345
+ void suppression.set(newEntry.id, newEntry);
346
+ applySuppression(error, newEntry);
347
+ queueDiscordNotification(newEntry.id, 1, true);
348
+
349
+ void ErrorNotificationService.triggerSuppressionUpdate(newEntry.id);
350
+ }
347
351
  }
348
352
 
349
353
  void ErrorNotificationService.triggerUnmatchedError(error);
@@ -22,13 +22,15 @@ IMPORTANT! Now I am properly calling shutdown, so none of the streamed logs shou
22
22
 
23
23
  //todonext
24
24
 
25
+ UGH... server notification isn't working now. UGH...
26
+
25
27
  5) Deploy watcher service to remote (yarn error-watch-public)
26
28
  6) Deploy CYOA
27
29
 
28
30
  5) Test on actual server, with actual logs
29
31
 
30
32
 
31
-
33
+ Invalid addition, you tried to add 1 + Infinity, operands must be valid numbers
32
34
 
33
35
 
34
36