Skip to content

Commit 09a8c07

Browse files
tamasfeLucioFranco
andauthored
feat: expose Status as a Response extension (#2145)
Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
1 parent fa413fc commit 09a8c07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tonic/src/status.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ impl Status {
581581
.headers_mut()
582582
.insert(http::header::CONTENT_TYPE, GRPC_CONTENT_TYPE);
583583
self.add_header(response.headers_mut()).unwrap();
584+
response.extensions_mut().insert(self);
584585
response
585586
}
586587

0 commit comments

Comments
 (0)