Skip to content

Commit 7977d45

Browse files
author
Sanchit Garg
committed
PLUGIN-1823: Updated error message as per the suggestion
1 parent 1c0bfe5 commit 7977d45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

database-commons/src/main/java/io/cdap/plugin/util/RetryUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ private static RuntimeException unwrapFailsafeException(Exception e,
104104
if (cause instanceof SQLException) {
105105
return dbErrorDetailsProvider.getProgramFailureException((SQLException) cause, null);
106106
} else if (cause instanceof RuntimeException) {
107-
return (RuntimeException) cause;
107+
return new RuntimeException("Operation failed with error", cause);
108108
} else if (cause instanceof Error) {
109-
return new RuntimeException("Failsafe wrapped an Error", cause);
109+
return new RuntimeException("Operation failed with error", cause);
110110
} else {
111-
return new RuntimeException("Failsafe wrapped a non-runtime exception", cause);
111+
return new RuntimeException("Operation failed", cause);
112112
}
113113
}
114114
if (e instanceof SQLException) {

0 commit comments

Comments
 (0)