Skip to content

Commit

Permalink
grpc: Attempt to read trailers always when parsing grpc exception
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh committed Nov 25, 2024
1 parent 8c3dce8 commit bd8e006
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ private fun Response.checkGrpcResponse() {
internal fun Response.grpcResponseToException(suppressed: IOException? = null): IOException? {
var trailers = headersOf()
var transportException = suppressed
if (suppressed == null) {
try {
trailers = trailers()
} catch (e: IOException) {
try {
trailers = trailers()
} catch (e: IOException) {
if (suppressed == null) {
transportException = e
}
}
Expand Down

0 comments on commit bd8e006

Please sign in to comment.