fix(sidecar): map non-Exception throwables to INTERNAL status

The vendored iOS client throws failures that do not extend Exception;
runRpc missed them, killing the RPC as a channel-level Unknown the
runner cannot classify. Catch Throwable instead.
This commit is contained in:
pj committed 2026-06-06 10:09:28 +05:30
1 parent 6b1188c5a2
commit 605c90e26d
1 file changed
+5 -1
@@ -195,7 +195,11 @@ class DriverService(
// a dropped-mid-action connection) keeps it, so the runner can // a dropped-mid-action connection) keeps it, so the runner can
// tell transient failures from fatal ones. // tell transient failures from fatal ones.
observer.onError(cause) observer.onError(cause)
} catch (cause: Exception) { } catch (cause: Throwable) {
// Throwable, not Exception: the vendored iOS client throws
// failures that do not extend Exception, and an uncaught one
// kills the RPC as a channel-level Unknown instead of a status
// the runner can classify.
observer.onError(io.grpc.Status.INTERNAL.withDescription(cause.toString()) observer.onError(io.grpc.Status.INTERNAL.withDescription(cause.toString())
.withCause(cause).asRuntimeException()) .withCause(cause).asRuntimeException())
} }