OpenConext-Attic / OpenConext-api

:warning: Obsolete respository, archive only :zzz:
Apache License 2.0
5 stars 4 forks source link

Error during querying of external group provider results in HTTP 404 response #8

Open pmeulen opened 10 years ago

pmeulen commented 10 years ago

When groups are queried and one of the groups providers returns an error, the result of the groups REST to API is a 404: GET /v1/social/rest/groups/urn:collab:person:surfnet.nl:pieter" 404 114 With this implementation one malfunctioning group provider will prevent any of the user's groups to be returned. The IMO desired behaviour is to return only the groups for the group providers that could be queried. Is there a scenario where returning a partial response is a problem?

Log of failed query: 2014-06-19 13:54:56,032 DEBUG [TP-Processor2] n.s.c.s.l.d.DiagnosticsLoggerFilter:80 - Response has error status (404), will dump aggregated log events 2014-06-19 13:57:55,407 DEBUG [TP-Processor1] n.s.c.s.l.d.DiagnosticsLoggerFilter:69 - No HttpSession available, will use request-local, random discriminator: dadec731-7920-4fc8-acbf-d2c961873b8d 2014-06-19 13:57:55,959 INFO [TP-Processor1] nl.surfnet.coin.api.ApiController:218 - Got getGroups-request, for userId 'urn:collab:person:surfnet.nl:pieter', on behalf of 'null' 2014-06-19 13:57:56,253 INFO [TP-Processor1] n.s.c.t.s.i.GroupServiceBasicAuthentication:62 - Getting groups for person urn:collab:person:surfnet.nl:pieter at groupProvider COmanage, using URL: https://demo.co.internet2.edu/registry/voot/groups/urn:collab:person:surfnet.nl:pieter?startIndex=0&count=2147483647 2014-06-19 13:57:56,401 ERROR [TP-Processor1] nl.surfnet.coin.api.ApiController:403 - Handling generic runtime exception, will respond with HTTP Not Found. com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149) ~[jersey-client-1.12.jar:1.12] at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:81) ~[jersey-client-1.12.jar:1.12] at com.sun.jersey.api.client.Client.handle(Client.java:648) ~[jersey-client-1.12.jar:1.12] at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680) ~[jersey-client-1.12.jar:1.12] at com.sun.jersey.api.client.WebResource.get(WebResource.java:191) ~[jersey-client-1.12.jar:1.12] at nl.surfnet.coin.teams.service.impl.GroupServiceBasicAuthentication.getGroup20Entry(GroupServiceBasicAuthentication.java:98) ~[coin-api-external-groups-4.0.0.jar:na] at nl.surfnet.coin.teams.service.impl.GroupServiceBasicAuthentication.getGroup20Entry(GroupServiceBasicAuthentication.java:64) ~[coin-api-external-groups-4.0.0.jar:na] at nl.surfnet.coin.api.GroupProviderConfigurationImpl.getGroup20Entry(GroupProviderConfigurationImpl.java:145) ~[GroupProviderConfigurationImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_55] ...