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

Clarify the client error situation #67

Closed
tomaka opened this issue Nov 18, 2019 · 3 comments
Closed

Clarify the client error situation #67

tomaka opened this issue Nov 18, 2019 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@tomaka
Copy link
Contributor

tomaka commented Nov 18, 2019

What happens when an error happens on the client side?
Everything in Client and RawClient regarding the behaviour after errors should be properly documented.

@tomaka tomaka added the documentation Improvements or additions to documentation label Nov 18, 2019
@tomaka tomaka added this to the First release on crates.io milestone Nov 21, 2019
@tomaka
Copy link
Contributor Author

tomaka commented Jan 28, 2020

Note: this issue was created at a time when the TransportClient was named RawClient and RawClient was named Client.

The questions in play here is: how do we indicate whether this is an error about a single request, or an error on the entire connection? Is the transport's state still valid after an error has been produced? Everything should be strongly typed and documented.

@tomaka
Copy link
Contributor Author

tomaka commented Feb 19, 2020

Unfortunately there's a big design flaw in that there's no way to associate a request with a response in the TransportClient. That means that for example an HTTP client that opens one connection per request cannot report that a specific request resulted in a 4xx or 5xx error.

@niklasad1
Copy link
Member

This is now fixed by having the following:

  • http, the background thread is removed and we just return propogate the error to the user if that happens (it's "synchronous-like")
  • ws when an error is received we terminate the connection and the client becomes useless, the error message is not great which could be improved but "hey you can read the logs" 🙄

However, the documentation could be more explicit regarding this but closing anyway.

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

No branches or pull requests

2 participants