Github user StephanEwen commented on the pull request: https://github.com/apache/flink/pull/1048#issuecomment-135769165 I have now actually a pretty interesting solution. I changed the SerializedThrowable such that it looks like the original exception, with respect to message, stack trace, printing, etc. Logging the serialized throwable, for example, looks like logging the original exception. If one forgets to de-serialize it, it is not super bad any more. Furthermore, the SerializedThrowable is not unwrapped when sent by a TaskManager to the JobManager, but kept as it is (skip some work). When sending an exception back to the client, the original message is sent back. Which may be a SerializedThrowable (if it originated at the workers) or not (if it originated at the JobManager, such as missing resources). The client would still need to check and deserialize like it does now.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---