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

There was an error with the transport. [javascript] #4706

Open
win9s opened this issue May 17, 2024 · 0 comments
Open

There was an error with the transport. [javascript] #4706

win9s opened this issue May 17, 2024 · 0 comments

Comments

@win9s
Copy link

win9s commented May 17, 2024

when signalr is reconnecting, i need to find out the specific reson when reconnect failed, but i got the same error "There was an error with the transport." , even the real error is token expired, and i viewd source code, here are the specific locations:

// WebSocketTransport.ts 
webSocket.onerror = (event: Event) => {
    let error: any = null;
    // ErrorEvent is a browser only type we need to check if the type exists before using it
    if (typeof ErrorEvent !== "undefined" && event instanceof ErrorEvent) {
        error = event.error;
    } else {
        error = new Error("There was an error with the transport.");
    }

    reject(error);
};

my program runs in a node environment, the original error has been converted

how can I get the original error? Or is this considered a bug?

by the way, I redefined the logic of reconnection, although I don't think this is related to the problem.

any response would be appreciated!

@win9s win9s changed the title There was an error with the transport. There was an error with the transport. [javascript] May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant