-
Notifications
You must be signed in to change notification settings - Fork 796
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
Improve reqwests
error display
#6377
Comments
One thing to be aware of is exposing sensitive headers, or URL path segments. We could also provide information on common causes of this error - e.g. network/runtime instability |
take |
take |
The documentation for There is Another option is to have for each object storage API provide its own scrubbing method to eliminate specific sensitive headers from AWS, Azure, etc. I do not know enough about these object storage APIs to make this change. For now I am just going to change to using the |
see apache#6377 This should help in the interim to identify specific causes of, sometimes confusing, network related errors. I think this change should be temporary until we can find a better way to improve error messages.
see apache#6377 This should help in the interim to identify specific causes of, sometimes confusing, network related errors. I think this change should be temporary until we can find a better way to improve error messages.
see apache#6377 This should help in the interim to identify specific causes of, sometimes confusing, network related errors. I think this change should be temporary until we can find a better way to improve error messages.
Regarding the argument that @tustvold brought up here: #6518 (comment) and that basically boils down to "people should walk the error chain": I think the issue here is that arrow-rs/object_store/src/aws/client.rs Lines 69 to 70 in 4adbeee
is wrong and #[snafu(display("Error bla bla: {}", source))] should be #[snafu(display("Error bla bla"))] |
I personally agree that walking the error chain should be the approach, it's the pattern used by the vast majority of other languages, but unfortunately support for this in the ecosystem is limited. If Rust had supported this from day one, perhaps we wouldn't be in this mess, but alas it did not. As it stands I'm honestly not even sure what the consensus is... Moving to this particular issue, I think we need to surface enough information within the default display implementation to diagnose issues, however, this does not mean we should just expose everything, including what may be sensitive or internal details. My point w.r.t walking the error chain is that in the absence of a clearly articulated error scenario the only option is to either expose everything, which I don't agree with, or instruct people to walk the error chain to get the more detailed information they require. Perhaps we could reframe this issue as a concrete, what would I like to be in the output that currently is not |
Fine with me. I think #5882 provides a good example. The |
This sounds reasonable to me, it certainly would help users to make more clear that error means that the request was interrupted mid-stream, even if there isn't really anything more that can be said about why. |
I feel that cramming more error sources into the As @crepererum pointed out, right now for a application developer, there is a confusing incompatibility in error messaging between Arrow ecosystem crates and (most?) other third-party crates. Using "So just use an error reporting library, "as the To highlight this visually I've made an example repo that creates a simple "application" using Here is the output: Error:
0: Generic S3 error: Error after 10 retries in 5.723990834s, max_retries:10, retry_timeout:180s, source:error sending request for url (http://169.254.169.254/latest/api/token)
1: Error after 10 retries in 5.723990834s, max_retries:10, retry_timeout:180s, source:error sending request for url (http://169.254.169.254/latest/api/token)
2: error sending request for url (http://169.254.169.254/latest/api/token)
3: client error (Connect)
4: tcp connect error: Host is down (os error 64)
5: Host is down (os error 64)
Location:
examples/object_store.rs:11
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets. Maybe this is tolerable, but it's definitely ugly. You are at least getting as much information about the error chain as possible. Additionally, by cramming more information into the top-level error message, you're helping users in the default case to discover useful errors beyond just "Generic S3 error". So there is an argument to be made that the current state is acceptable, even if not ideal.. I think this discussion is beyond the scope of just "improve I would also like to create a similar example repo for DataFusion to bring up the discussion there, since they also use the same approach to error messaging, but I think the discussion needs to happen here primarily since DataFusion is largely required to follow whatever convention |
From our (InfluxData's) side, we are most likely going to unroll the cause chain for |
Originally reported in #5882 (comment) :
For #5882 we only report
Generic S3 error: error decoding response body
. We should try to improve the error message. It seems that theDisplay
impl. is not super helpful and we might wanna useDebug
instead, see seanmonstar/reqwest#2373The text was updated successfully, but these errors were encountered: