Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,11 @@ public void markConfigAsDefault(String name) {
}

@Override
@Transactional
public Configs getConfigs() {
return configs;
}

@Override
@Transactional
public Config getConfigByName(String name) {
Config config = StringUtils.isEmpty(name) ?
configs.getByName(configs.getDefaultConfigName()) : configs.getByName(name);
Expand All @@ -130,7 +128,6 @@ public Config getConfigByName(String name) {
}

@Override
@Transactional
public Config getDefaultConfig() {
return configs.getByName(configs.getDefaultConfigName());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public Patient createPatient(String configName, Patient patient) {
personResource.checkPersonAttributeTypes(config, patient.getPerson());
patient.setPerson(personResource.createPerson(config, patient.getPerson()));
} catch (HttpClientErrorException e) {
if(StringUtils.equals("401 Unauthorized", e.getMessage())) {
LOGGER.info(String.format("%s: User: %s Password: %s.\n", e.getMessage(), config.getUsername(), config.getPassword()));
}

throw new OpenMRSException(String.format("Could not create Person. %s %s", e.getMessage(), e.getResponseBodyAsString()), e);
}
}
Expand Down