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

Keep emitting the error as an object for Maximum number of reconnect attempts reached! #5889

Closed
2 tasks done
Muhammad-Altabba opened this issue Mar 6, 2023 · 0 comments
Closed
2 tasks done
Assignees
Labels

Comments

@Muhammad-Altabba
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Feature Request

At WebSocketProvider, the error when the reconnect attempt reached, was an object in version 1.x but now just an error sting.
In v1.x:

this.emit(this.ERROR, errors.MaxAttemptsReachedOnReconnectingError());

In 4.x:

const errorMsg = `Max connection attempts exceeded (${this._reconnectOptions.maxAttempts})`;

And the error message was:
Maximum number of reconnect attempts reached!

But changed in v.4 to:
Max connection attempts exceeded (${this._reconnectOptions.maxAttempts})

I suggest keeping the old way of using an Error object and also keeping the old string to reduce breaking changes. However, we may add the number of max attempts at the end of the old error message.

Use Cases

Reduce breaking changes between 1.x and 4.x

Implementation Ideas

No response

Feature Examples/References

No response

Are you willing to implement this feature?

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

When branches are created from issues, their pull requests are automatically linked.

1 participant