Debug Mode logs unnecessary errors #3

Closed
opened 2023-08-22 19:04:04 +00:00 by MarciiTheDev · 1 comment
MarciiTheDev commented 2023-08-22 19:04:04 +00:00 (Migrated from github.com)

When using v1.1.3-dev of the NodeJS MarcSync Client & the signalR.LogLevel in SubscriptionManager.ts at line 24 is set to signalR.LogLevel.Debug instead of signalR.LogLevel.None, it logs the following error everytime I update an entry.

Error: A callback for the method 'entryupdated' threw error 'TypeError: Cannot read properties of undefined (reading 'forEach')'.

This happens everytime I update an entry in my Collection. However, same counts for others when there are no subscribers on that subscription. The error tells us that it tries to look for subscribers in an array called: this._subscriptions, defined in the SubscriptionManager.ts script, by doing this._subscriptions.entryUpdated.forEach(). However, this._subscriptions.entryUpdated is undefined till a script subscribes to the entryUpdated subscription.

Same error applies to all other subscriptions when they are not initialized.

When using v1.1.3-dev of the NodeJS MarcSync Client & the `signalR.LogLevel` in SubscriptionManager.ts at line 24 is set to `signalR.LogLevel.Debug` instead of `signalR.LogLevel.None`, it logs the following error everytime I update an entry. Error: A callback for the method 'entryupdated' threw error 'TypeError: Cannot read properties of undefined (reading 'forEach')'. This happens everytime I update an entry in my Collection. However, same counts for others when there are no subscribers on that subscription. The error tells us that it tries to look for subscribers in an array called: `this._subscriptions`, defined in the SubscriptionManager.ts script, by doing `this._subscriptions.entryUpdated.forEach()`. However, `this._subscriptions.entryUpdated` is `undefined` till a script subscribes to the `entryUpdated` subscription. Same error applies to all other subscriptions when they are not initialized.
MarciiTheDev commented 2023-08-22 19:20:07 +00:00 (Migrated from github.com)

Resolved with marcsync@v1.1.3-dev

Resolved with [marcsync@v1.1.3-dev](https://github.com/MarciiTheDev/marcsync-nodejs-client/releases/tag/v1.1.3-dev)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MarcSync/nodejs-client#3
No description provided.