Skip to content

Commit

Permalink
update error message to indicate the datasource name passed
Browse files Browse the repository at this point in the history
Signed-off-by: Saad Khan <[email protected]>
  • Loading branch information
khansaad committed Nov 11, 2024
1 parent 6254618 commit a2c4e34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/autotune/common/utils/CommonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public static DataSourceInfo getDataSourceInfo(String dataSourceName) throws Exc
// fetch the datasource from the DB
datasource = dataSourceManager.fetchDataSourceFromDBByName(dataSourceName);
if (isInvalidDataSource(datasource)) {
throw new Exception(KruizeConstants.DataSourceConstants.DataSourceErrorMsgs.INVALID_DATASOURCE_INFO);
throw new Exception(KruizeConstants.DataSourceConstants.DataSourceErrorMsgs.INVALID_DATASOURCE_INFO + dataSourceName);
}
}
return datasource;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/autotune/utils/KruizeConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ public static class DataSourceErrorMsgs {
public static final String SERVICE_NOT_FOUND = "Can not find service with specified name.";
public static final String ENDPOINT_NOT_FOUND = "Service endpoint not found.";
public static final String MISSING_DATASOURCE_INFO = "Datasource is missing, add a valid Datasource";
public static final String INVALID_DATASOURCE_INFO = "Datasource is either missing or is invalid";
public static final String INVALID_DATASOURCE_INFO = "Datasource is either missing or is invalid: ";

private DataSourceErrorMsgs() {
}
Expand Down

0 comments on commit a2c4e34

Please sign in to comment.