Dennis-Mircea commented on code in PR #1233:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/1233#discussion_r4394035866
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/FlinkResourceExceptionUtils.java:
##########
@@ -122,8 +123,11 @@ private static FlinkResourceException
convertToFlinkResourceException(
Map<String, String> labelMapper) {
FlinkResourceException flinkResourceException =
FlinkResourceException.builder().build();
- getSubstringWithMaxLength(throwable.getClass().getName(),
lengthThreshold)
- .ifPresent(flinkResourceException::setType);
+ String type =
+ throwable instanceof SerializedThrowable
+ ? ((SerializedThrowable)
throwable).getOriginalErrorClassName()
+ : throwable.getClass().getName();
Review Comment:
I'd place this special handling under `ExceptionUtils` rather than here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]