-
Couldn't load subscription status.
- Fork 178
Open
Description
| override fun onClose(status: Status, trailersMetadata: GrpcMetadata) { |
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 is CancellationException -> status.cause
else -> status.asException(trailersMetadata) // Always converts to StatusException
}Metadata
Metadata
Assignees
Labels
No labels