Adding e.printStackTrace to errors in redshift as a hotfix (#6094)

This commit is contained in:
Trisha Anand 2021-07-23 14:39:48 +05:30 committed by GitHub
parent cef530e835
commit a8df4ee010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -269,6 +269,7 @@ public class RedshiftPlugin extends BasePlugin {
} }
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace();
return Mono.error(new AppsmithPluginException(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, e.getMessage())); return Mono.error(new AppsmithPluginException(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, e.getMessage()));
} finally { } finally {
if (resultSet != null) { if (resultSet != null) {
@ -308,6 +309,7 @@ public class RedshiftPlugin extends BasePlugin {
return e; return e;
}) })
.onErrorResume(error -> { .onErrorResume(error -> {
error.printStackTrace();
if (error instanceof StaleConnectionException) { if (error instanceof StaleConnectionException) {
return Mono.error(error); return Mono.error(error);
} }
@ -395,6 +397,7 @@ public class RedshiftPlugin extends BasePlugin {
configurationConnection != null && READ_ONLY.equals(configurationConnection.getMode())); configurationConnection != null && READ_ONLY.equals(configurationConnection.getMode()));
return Mono.just(connection); return Mono.just(connection);
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace();
return Mono.error( return Mono.error(
new AppsmithPluginException( new AppsmithPluginException(
AppsmithPluginError.PLUGIN_DATASOURCE_ARGUMENT_ERROR, AppsmithPluginError.PLUGIN_DATASOURCE_ARGUMENT_ERROR,
@ -654,6 +657,7 @@ public class RedshiftPlugin extends BasePlugin {
// Get templates for each table and put those in. // Get templates for each table and put those in.
getTemplates(tablesByName); getTemplates(tablesByName);
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace();
return Mono.error( return Mono.error(
new AppsmithPluginException( new AppsmithPluginException(
AppsmithPluginError.PLUGIN_GET_STRUCTURE_ERROR, AppsmithPluginError.PLUGIN_GET_STRUCTURE_ERROR,
@ -661,6 +665,7 @@ public class RedshiftPlugin extends BasePlugin {
) )
); );
} catch (AppsmithPluginException e) { } catch (AppsmithPluginException e) {
e.printStackTrace();
return Mono.error(e); return Mono.error(e);
} }