diff --git a/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java b/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java index 72b254fa36..919e59f042 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java @@ -1323,11 +1323,22 @@ public class DatasourceServer implements DatasourceApi { } resObj = method.invoke(null, object); } catch (Exception e) { - if (e.getCause() != null && e.getCause() instanceof DEException) { - DEException.throwException(e.getCause().getMessage()); - } - DEException.throwException(e); + DEException.throwException(msg(e)); } return resObj; } + + private String msg(Throwable e) { + Throwable exception = e; + while (true) { + if (exception.getCause() == null) { + return exception.getMessage(); + } + if (exception instanceof DEException && !(exception.getCause() instanceof DEException)) { + return exception.getMessage(); + } + exception = exception.getCause(); + + } + } } diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue b/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue index 6ae4175579..fc271e6b1a 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue @@ -829,6 +829,7 @@ defineExpose({ > - -