Skip to content

[SignalR TS] Ignore user errors from stream callbacks #34136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 9, 2021

Conversation

BrennanConroy
Copy link
Member

We do the same thing for .on and .onclose

@BrennanConroy BrennanConroy added area-signalr Includes: SignalR clients and servers feature-client-javascript Related to the SignalR JS client labels Jul 6, 2021
@BrennanConroy BrennanConroy changed the title [SignalR TS] Ignore user errors from stream callbcks [SignalR TS] Ignore user errors from stream callbacks Jul 6, 2021
try {
callback(message);
} catch (e) {
this._logger.log(LogLevel.Error, `Stream callback threw error '${e}'.`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this._logger.log(LogLevel.Error, `Stream callback threw error '${e}'.`);
this._logger.log(LogLevel.Error, `Stream callback threw error '${e.stack}'.`);

I think we should probably audit the other places we log errors for this.

@BrennanConroy BrennanConroy merged commit dd3771f into main Jul 9, 2021
@BrennanConroy BrennanConroy deleted the brecon/streamthrow branch July 9, 2021 19:45
@ghost ghost added this to the 6.0-preview7 milestone Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-signalr Includes: SignalR clients and servers feature-client-javascript Related to the SignalR JS client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants