add some logging and error checking
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 11 Jan 2008 19:25:18 +0000 (19:25 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 11 Jan 2008 19:25:18 +0000 (19:25 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2559 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/saml2/SSOProfileHandler.java

index 8f9f8a4..53b6cba 100644 (file)
@@ -379,6 +379,11 @@ public class SSOProfileHandler extends AbstractSAML2ProfileHandler {
                 requestContext.setPeerEntityRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
                 requestContext.setPeerEntityRoleMetadata(relyingPartyMetadata
                         .getSPSSODescriptor(SAMLConstants.SAML20P_NS));
+            }else{
+                log.error("Unable to locate metadata for relying party ({})", relyingPartyId);
+                requestContext.setFailureStatus(buildStatus(StatusCode.RESPONDER_URI, null,
+                        "Error locating relying party metadata"));
+                throw new ProfileException("Error locating relying party metadata");
             }
         } catch (MetadataProviderException e) {
             log.error("Unable to locate metadata for relying party");