Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jul 15, 2024

Description

Since reqwest 0.12.1 (seanmonstar/reqwest#2199), fmt::Display for reqwest::Error no longer includes the source.

The whole reason for WrappedReqwestError was to avoid displaying the source twice. But since the above change, the source isn't displayed at all.

After this change, dfx will once again display the error source(s) for request::Error, but on separate lines ("Caused by:") like other error sources.

How Has This Been Tested?

Tested locally with dfx extension install with an extension.json with missing fields

Before

Error: error decoding response body

After

Error: error decoding response body
Caused by: missing field `homepage` at line 4 column 4

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

Since reqwest 0.12.1 (seanmonstar/reqwest#2199),
fmt::Display for reqwest::Error no longer includes the source.

The whole reason for WrappedReqwestError was to avoid displaying the source
twice. But since the above change, the source isn't displayed at all.

After this change, dfx will once again display the error source(s) for
request::Error, but on separate lines ("Caused by:") like other error sources.
@ghost ghost marked this pull request as ready for review July 15, 2024 17:11
@ghost ghost self-requested a review as a code owner July 15, 2024 17:11
@ghost ghost merged commit 1d5677b into master Jul 15, 2024
@ghost ghost deleted the ens/display-reqwest-error-source branch July 15, 2024 18:25
rikonor pushed a commit that referenced this pull request Feb 3, 2025
Since reqwest 0.12.1 (seanmonstar/reqwest#2199),
fmt::Display for reqwest::Error no longer includes the source.

The whole reason for WrappedReqwestError was to avoid displaying the source
twice. But since the above change, the source isn't displayed at all.

After this change, dfx will once again display the error source(s) for
request::Error, but on separate lines ("Caused by:") like other error sources.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant