Skip to content
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

With foreverFrame/serverSentEvent/longPolling transport, when an exception is thrown from delayed expression returned from Hub method, no trace for the error in server and no failure callback on client #2857

Closed
Xiaohongt opened this issue Feb 4, 2014 · 3 comments
Milestone

Comments

@Xiaohongt
Copy link
Contributor

Functional impact:
When a client invoking the following hub method, with foreverFrame or serverSentEvent or longPolling transport, on client fail callback not get called (empty 200 response for the Ajax request ), on server no trace logged for the error:

Note, it is not regression.

public IEnumerable<int> GetStuff()
{
    yield return 1;
    yield return 2;
    throw new Exception("This is will repro");
}

Expected:
On client fail callback will get called.
On server trace will log the error.

@halter73
Copy link
Member

halter73 commented Feb 5, 2014

I totally agree that the client fail callback should get triggered.

However, I think having the server tracing the error would be inconsistent, since we don't normally do that for hub methods that throw synchronously or return a faulted task.

Instead we just bump performance counters when those things happen which we should also do for this.

@DamianEdwards DamianEdwards added this to the 2.1.0 Beta milestone Apr 2, 2014
@abnanda1
Copy link
Contributor

abnanda1 commented Apr 5, 2014

So we should send something in the response to indicate that an error occurred on the server?

@DamianEdwards DamianEdwards modified the milestones: Backlog, 2.1.0 Beta Apr 14, 2014
@DamianEdwards
Copy link
Member

This is incredibly difficult to do as the response is already streaming and there isn't a way to insert a defined error in the middle of a broken stream (in essence). Won't fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants