Skip to content
Closed
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 @@ -10,6 +10,7 @@
import org.springframework.core.io.Resource;
import org.springframework.http.client.support.BasicAuthenticationInterceptor;
import org.springframework.util.CollectionUtils;
import org.springframework.web.client.HttpStatusCodeException;
import org.springframework.web.client.RestTemplate;

import java.util.ArrayList;
Expand Down Expand Up @@ -65,9 +66,17 @@ public List<UserAttribute> aggregate(List<UserAttribute> input, Map<String, List
Map<String, List<String>> body;
try {
body = restTemplate.getForEntity(url, Map.class).getBody();
} catch (RuntimeException e) {
} catch (HttpStatusCodeException e) {
String msg = String.format("InstitutionEndpoint %s configured for: %s, returned an error", institutionEndpoint, spEntityID);
LOG.error(msg, e);
if (e.getStatusCode().value() == 404) {
LOG.info(msg + " 404 Not Found");
} else {
LOG.error(msg, e);
}
return errorResponse(input);
} catch (RuntimeException e) {
// Voor netwerkfouten of andere runtime issues
LOG.error("System error calling InstitutionEndpoint", e);
return errorResponse(input);
}

Expand Down