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

Figure out hyper::Error Display including source chain #2844

Closed
seanmonstar opened this issue May 20, 2022 · 2 comments · Fixed by #3312
Closed

Figure out hyper::Error Display including source chain #2844

seanmonstar opened this issue May 20, 2022 · 2 comments · Fixed by #3312
Labels
A-error Area: error handling C-feature Category: feature. This is adding a new feature.
Milestone

Comments

@seanmonstar
Copy link
Member

The current Display output of Error doesn't match what many people think it should, namely that it prints the error chain. We need to either:

@seanmonstar seanmonstar added C-feature Category: feature. This is adding a new feature. B-rfc Blocked: More comments would be useful in determine next steps. A-error Area: error handling labels May 20, 2022
@seanmonstar seanmonstar added this to the 1.0 milestone May 20, 2022
@seanmonstar seanmonstar moved this to Todo in hyper 1.0 Jun 15, 2022
@seanmonstar seanmonstar moved this from Todo to RFC in hyper 1.0 Jun 15, 2022
@seanmonstar
Copy link
Member Author

I filed a proposal for the working group: rust-lang/project-error-handling#53

@seanmonstar seanmonstar modified the milestones: 1.0 RC1, 1.0 Final Sep 8, 2022
@seanmonstar seanmonstar moved this from Needs discussion / design to Blocked in hyper 1.0 Dec 21, 2022
@seanmonstar seanmonstar moved this from Blocked to Todo in hyper 1.0 Sep 11, 2023
@seanmonstar
Copy link
Member Author

There hasn't been any progress on the proposal in the working group. To move forward, we can update hyper to format the way many in the ecosystem expect it to. If something better ever gets proposed and accepted, we can do that then.

@seanmonstar seanmonstar removed the B-rfc Blocked: More comments would be useful in determine next steps. label Sep 11, 2023
seanmonstar added a commit that referenced this issue Sep 11, 2023
hyper's `Error` used to print the error source automatically, preferring
to provide a better default for users who do not know about `Report`.
But, to fit better with the wider ecosystem, this changes the format to
only print the hyper `Error` itself, and not its source.

Closes #2844

BREAKING CHANGE: The format no longer prints the error chain. Be sure to
  check if you are logging errors directly.

  The `Error::message()` method is removed, it is no longer needed.

  The `Error::into_cause()` method is removed.
@seanmonstar seanmonstar moved this from Todo to In Progress in hyper 1.0 Sep 11, 2023
seanmonstar added a commit that referenced this issue Sep 11, 2023
hyper's `Error` used to print the error source automatically, preferring
to provide a better default for users who do not know about `Report`.
But, to fit better with the wider ecosystem, this changes the format to
only print the hyper `Error` itself, and not its source.

Closes #2844

BREAKING CHANGE: The format no longer prints the error chain. Be sure to
  check if you are logging errors directly.

  The `Error::message()` method is removed, it is no longer needed.

  The `Error::into_cause()` method is removed.
seanmonstar added a commit that referenced this issue Sep 11, 2023
hyper's `Error` used to print the error source automatically, preferring
to provide a better default for users who do not know about `Report`.
But, to fit better with the wider ecosystem, this changes the format to
only print the hyper `Error` itself, and not its source.

Closes #2844

BREAKING CHANGE: The format no longer prints the error chain. Be sure to
  check if you are logging errors directly.

  The `Error::message()` method is removed, it is no longer needed.

  The `Error::into_cause()` method is removed.
seanmonstar added a commit that referenced this issue Sep 11, 2023
hyper's `Error` used to print the error source automatically, preferring
to provide a better default for users who do not know about `Report`.
But, to fit better with the wider ecosystem, this changes the format to
only print the hyper `Error` itself, and not its source.

Closes #2844

BREAKING CHANGE: The format no longer prints the error chain. Be sure to
  check if you are logging errors directly.

  The `Error::message()` method is removed, it is no longer needed.

  The `Error::into_cause()` method is removed.
@github-project-automation github-project-automation bot moved this from In Progress to Done in hyper 1.0 Sep 13, 2023
seanmonstar added a commit that referenced this issue Sep 13, 2023
hyper's `Error` used to print the error source automatically, preferring
to provide a better default for users who do not know about `Report`.
But, to fit better with the wider ecosystem, this changes the format to
only print the hyper `Error` itself, and not its source.

Closes #2844

BREAKING CHANGE: The format no longer prints the error chain. Be sure to
  check if you are logging errors directly.

  The `Error::message()` method is removed, it is no longer needed.

  The `Error::into_cause()` method is removed.
0xE282B0 pushed a commit to 0xE282B0/hyper that referenced this issue Jan 12, 2024
…rium#3312)

hyper's `Error` used to print the error source automatically, preferring
to provide a better default for users who do not know about `Report`.
But, to fit better with the wider ecosystem, this changes the format to
only print the hyper `Error` itself, and not its source.

Closes hyperium#2844

BREAKING CHANGE: The format no longer prints the error chain. Be sure to
  check if you are logging errors directly.

  The `Error::message()` method is removed, it is no longer needed.

  The `Error::into_cause()` method is removed.
0xE282B0 pushed a commit to 0xE282B0/hyper that referenced this issue Jan 16, 2024
…rium#3312)

hyper's `Error` used to print the error source automatically, preferring
to provide a better default for users who do not know about `Report`.
But, to fit better with the wider ecosystem, this changes the format to
only print the hyper `Error` itself, and not its source.

Closes hyperium#2844

BREAKING CHANGE: The format no longer prints the error chain. Be sure to
  check if you are logging errors directly.

  The `Error::message()` method is removed, it is no longer needed.

  The `Error::into_cause()` method is removed.

Signed-off-by: Sven Pfennig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-error Area: error handling C-feature Category: feature. This is adding a new feature.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant