heyihong commented on code in PR #42377:
URL: https://github.com/apache/spark/pull/42377#discussion_r1310876196


##########
connector/connect/common/src/main/scala/org/apache/spark/sql/connect/client/GrpcExceptionConverter.scala:
##########
@@ -64,6 +69,94 @@ private[client] object GrpcExceptionConverter extends 
JsonUtils {
     }
   }
 
+  private def enrichError(errors: Array[Error], info: ErrorInfo): Array[Error] 
= {
+    val sessionId = info.getMetadataOrDefault("sessionId", null)
+    val userId = info.getMetadataOrDefault("userId", null)
+
+    if (sessionId == null || userId == null) {
+      return errors
+    }
+
+    try {
+      val errorInfoResponse = stub.getErrorInfo(

Review Comment:
   I renamed the stub to grpcStub



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to