Skip to content

Comments

Put source error into the Display impl of Status#2417

Merged
tottoto merged 2 commits intohyperium:masterfrom
bobrik:ivan/source
Oct 29, 2025
Merged

Put source error into the Display impl of Status#2417
tottoto merged 2 commits intohyperium:masterfrom
bobrik:ivan/source

Conversation

@bobrik
Copy link
Contributor

@bobrik bobrik commented Oct 7, 2025

Here's how the error looks before this change:

status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error"

And here it is after:

status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error", source: tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: GoAway(b"ivan_says_hello", ENHANCE_YOUR_CALM, Remote) }))

The latter gives the user a lot more context about the issue.

Here's how the error looks before this change:

```
status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error"
```

And here it is after:

```
status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error", source: tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: GoAway(b"ivan_says_hello", ENHANCE_YOUR_CALM, Remote) }))
```

The latter gives the user a lot more context about the issue.
Copy link
Collaborator

@tottoto tottoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tottoto tottoto enabled auto-merge (squash) October 29, 2025 21:56
@tottoto tottoto merged commit 36a8a8e into hyperium:master Oct 29, 2025
20 checks passed
alexanderrilee pushed a commit to alexanderrilee/tonic that referenced this pull request Oct 29, 2025
Here's how the error looks before this change:

```
status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error"
```

And here it is after:

```
status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error", source: tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: GoAway(b"ivan_says_hello", ENHANCE_YOUR_CALM, Remote) }))
```

The latter gives the user a lot more context about the issue.

Co-authored-by: tottoto <[email protected]>
jen20 pushed a commit to jen20/tonic that referenced this pull request Dec 30, 2025
Here's how the error looks before this change:

```
status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error"
```

And here it is after:

```
status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error", source: tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: GoAway(b"ivan_says_hello", ENHANCE_YOUR_CALM, Remote) }))
```

The latter gives the user a lot more context about the issue.

Co-authored-by: tottoto <[email protected]>
LucioFranco added a commit that referenced this pull request Jan 28, 2026
# Changelog for v0.14.3

## Features

- Expose `tcp_keepalive_interval` and `tcp_keepalive_retries` options on
Server (#2472)
- Allow configuration of `max_local_error_reset_streams` on Server
(#2437)
- Put source error into the `Display` impl of `Status` (#2417)
- `Server::default()` now sets `TCP_NODELAY` to true (#2413)

## Bug Fixes

- Respect `max_message_size` when decompressing a message (#2484)
- Depend on http at least 1.1.0 (#2426)

## Documentation

- Fix documentation links for timeout configuration (#2483)
- Fix documentation typos and grammar issues in status.rs and
codec/mod.rs (#2468)
- Fix labels in `Display for Status` (#2414)
- Fix features docs in tonic-build and tonic-prost-build (#2434)
- Remove redundant word in tonic-build and tonic-prost-build README
(#2425)
grembo pushed a commit to grembo/tonic that referenced this pull request Feb 3, 2026
Here's how the error looks before this change:

```
status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error"
```

And here it is after:

```
status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error", source: tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: GoAway(b"ivan_says_hello", ENHANCE_YOUR_CALM, Remote) }))
```

The latter gives the user a lot more context about the issue.

Co-authored-by: tottoto <[email protected]>
LucioFranco pushed a commit that referenced this pull request Feb 13, 2026
Here's how the error looks before this change:

```
status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error"
```

And here it is after:

```
status: 'Some resource has been exhausted', self: "h2 protocol error: http2 error", source: tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: GoAway(b"ivan_says_hello", ENHANCE_YOUR_CALM, Remote) }))
```

The latter gives the user a lot more context about the issue.

Co-authored-by: tottoto <[email protected]>
LucioFranco added a commit that referenced this pull request Feb 13, 2026
- Expose `tcp_keepalive_interval` and `tcp_keepalive_retries` options on
Server (#2472)
- Allow configuration of `max_local_error_reset_streams` on Server
(#2437)
- Put source error into the `Display` impl of `Status` (#2417)
- `Server::default()` now sets `TCP_NODELAY` to true (#2413)

- Respect `max_message_size` when decompressing a message (#2484)
- Depend on http at least 1.1.0 (#2426)

- Fix documentation links for timeout configuration (#2483)
- Fix documentation typos and grammar issues in status.rs and
codec/mod.rs (#2468)
- Fix labels in `Display for Status` (#2414)
- Fix features docs in tonic-build and tonic-prost-build (#2434)
- Remove redundant word in tonic-build and tonic-prost-build README
(#2425)
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.

2 participants