Commit 86fb8ad9 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Catch exception caused when user retrieval from Stud.IP fails with 500

parent 3f7359d8
......@@ -145,6 +145,7 @@ public class StudipRestConnectorDaoImpl implements ConnectorDao {
private StudipUser getUserByName(String username) {
logger.trace("Retrieve user {}", username);
try {
ResponseEntity<StudipUsersWrapper> usersWrapperEntity = restTemplate.exchange(
userSearchUri,
HttpMethod.GET,
......@@ -161,6 +162,9 @@ public class StudipRestConnectorDaoImpl implements ConnectorDao {
}
}
logger.trace("No user was found for username {}", username);
} catch (RestClientException e) {
logger.error("Connector failed to retrieve user's ID from Stud.IP: {}", e.getMessage());
}
return null;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment