Skip to content
Snippets Groups Projects

Fix issue w/ OIDC failing on REST client requests

Merged Martin Lowe requested to merge malowe/main/7 into main
3 files
+ 20
9
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -35,6 +35,8 @@ import org.eclipsefoundation.info.models.BoardMemberData;
import org.eclipsefoundation.info.models.BoardMemberData.FullRelation;
import org.eclipsefoundation.info.models.CouncilMemberData;
import org.eclipsefoundation.info.service.FoundationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.quarkus.logging.Log;
import jakarta.enterprise.context.ApplicationScoped;
@@ -48,6 +50,7 @@ import jakarta.ws.rs.WebApplicationException;
*/
@ApplicationScoped
public class DefaultFoundationService implements FoundationService {
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultFoundationService.class);
private final CachingService cache;
private final APIMiddleware middle;
@@ -103,10 +106,15 @@ public class DefaultFoundationService implements FoundationService {
throw new BadRequestException();
}
// get council chairs
List<FullPeopleProjectData> chairs = middle
.getAll(i -> api.getPeopleProjectsByRelations(i, Arrays.asList(council.chairRelation()), null, true),
FullPeopleProjectData.class);
// get council chairs, defaulting to an empty list
List<FullPeopleProjectData> chairs = Collections.emptyList();
try {
chairs = middle
.getAll(i -> api.getPeopleProjectsByRelations(i, Arrays.asList(council.chairRelation()), null, true),
FullPeopleProjectData.class);
} catch (WebApplicationException e) {
LOGGER.warn("Unable to fetch chairs, results may be inaccurate for this cache cycle", e);
}
// get the appointed reps from various records
List<CouncilMemberData.Result> out = new ArrayList<>();
@@ -131,8 +139,8 @@ public class DefaultFoundationService implements FoundationService {
}
/**
* Retrieve council members by fetching people project records with council relation codes. Additionally fetch associated
* organization contact records where available to map company appointed users.
* Retrieve council members by fetching people project records with council relation codes. Additionally fetch associated organization
* contact records where available to map company appointed users.
*
* @param relationCodes the list of relation codes for the current council
* @param chairs the prefetched list of chairs for the current council
Loading