assertions.add(assertion); } catch (NullPointerException e) { log.error("No assertions for the subject:" + user + " and request id:" + query.getID(), e); throw new IdentitySAML2QueryException("No assertions for the subject:" + user + " and request id:" + query.getID()); response = QueryResponseBuilder.build(assertions, issuerConfig, user); log.debug("Response generated with ID : " + response.getID() + " For the request id:" + query.getID()); } catch (IdentitySAML2QueryException e) { log.error("Unable to build response for the request id:" + query.getID(), e); throw new IdentitySAML2QueryException("Unable to build response for the request id:" + query.getID());