Skip to content

Commit 3f845de

Browse files
committed
cleanup p3
1 parent 78fabd9 commit 3f845de

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main/java/org/ohdsi/webapi/trexsql/TrexSQLInstanceManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public TrexSQLInstanceManager(TrexSQLConfig config) {
3131

3232
public Object getInstance() {
3333
if (!config.isEnabled()) {
34-
throw new IllegalStateException("Trexsql is not enabled");
34+
throw new IllegalStateException("TrexSQL is not enabled");
3535
}
3636

3737
if (trexsqlDb == null) {

src/main/java/org/ohdsi/webapi/trexsql/TrexSQLService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public List<Map<String, Object>> searchVocab(String sourceKey, String searchTerm
4646
log.debug("Searching vocabulary for source {} with term: {}", sourceKey, searchTerm);
4747

4848
TrexSQLSourceConfig sourceConfig = config.getSourceConfig(sourceKey);
49+
if (sourceConfig == null) {
50+
throw new IllegalStateException("TrexSQL source configuration not found for key: " + sourceKey);
51+
}
52+
4953
String databaseCode = sourceConfig.getDatabaseCode();
5054

5155
Map<String, Object> options = new HashMap<>();

0 commit comments

Comments
 (0)