Skip to content

Debug Mode logs unnecessary errors #3

@MarciiTheDev

Description

@MarciiTheDev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions