crepererum opened a new pull request, #4873:
URL: https://github.com/apache/arrow-rs/pull/4873
# Which issue does this PR close?
\-
# Rationale for this change
Make error message actually readable:
**Before:**
```text
thread 'main' panicked at 'collect data stream: Status { code: Internal,
message: "h2 protocol error: error reading a body from connection: stream error
received: unexpected internal error encountered", source:
Some(hyper::Error(Body, Error { kind: Reset(S
treamId(3), INTERNAL_ERROR, Remote) })) }',
arrow-flight/src/bin/flight_sql_client.rs:130:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
**After:**
```text
Error: read flight data
Caused by:
0: collect data stream
1: status: Internal, message: "h2 protocol error: error reading a body
from connection: stream error received: unexpected internal error encountered",
details: [], metadata: MetadataMap { headers: {} }
2: error reading a body from connection: stream error received:
unexpected internal error encountered
3: stream error received: unexpected internal error encountered
```
# What changes are included in this PR?
Use `anyhow`s context instead of `expect` all over the place.
Note that this ONLY applies to the CLI, not to any library error handling.
# Are there any user-facing changes?
Better errors.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]