Haoyan Geng created SPARK-58629:
-----------------------------------

             Summary: Avoid empty fallback gRPC errors
                 Key: SPARK-58629
                 URL: https://issues.apache.org/jira/browse/SPARK-58629
             Project: Spark
          Issue Type: Improvement
          Components: Connect
    Affects Versions: 4.2.0
            Reporter: Haoyan Geng


Spark Connect's fallback error conversion can emit a gRPC UNKNOWN status with a 
null or empty description when a fatal Throwable has no message.

  \{code:scala}
  case e: Throwable =>
    Status.UNKNOWN
      .withCause(e)
      .withDescription(Utils.abbreviate(e.getMessage, 2048))
      .asRuntimeException()
  \{code}

Utils.abbreviate(null, 2048) returns null, while an empty message remains 
empty. For example, a bare InterruptedException has no message and therefore 
produces an opaque client-side error without a useful failure description.

This is related to SPARK-43125, which fixed a similar problem in the structured 
error conversion path. The generic fatal-error fallback was added afterward and 
remains susceptible to null or empty messages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to