You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current implementation of ClientCalls.onClose(), when a response from the server is not isOk and the exception is not a CancellationException, it forcibly converts any exception to StatusException (checked exception) before passing it to responses.close().
While Kotlin doesn't enforce checked exception handling, I'm curious if this conversion is intentional, especially in cases where the original exception is StatusRuntimeException.
Current behavior:
val cause =when {
status.isOk ->null
status.cause isCancellationException-> status.cause
else-> status.asException(trailersMetadata) // Always converts to StatusException
}
The text was updated successfully, but these errors were encountered:
bong01
changed the title
Forced StatusException conversion in ClientCalls.close()
Forced StatusException conversion in ClientCalls.onClose()
Feb 9, 2025
grpc-kotlin/stub/src/main/java/io/grpc/kotlin/ClientCalls.kt
Line 295 in a969a91
In the current implementation of
ClientCalls.onClose()
, when a response from the server is notisOk
and the exception is not aCancellationException
, it forcibly converts any exception toStatusException
(checked exception) before passing it toresponses.close()
.While Kotlin doesn't enforce checked exception handling, I'm curious if this conversion is intentional, especially in cases where the original exception is
StatusRuntimeException
.Current behavior:
The text was updated successfully, but these errors were encountered: