In order to handle Spark exception on RDD operations I can use the following approach with additional exceptions column:
exceptions
val df: DataFrame = ... va