Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. private void handleCredentialBadRequestException(PowerIdRestException e) throws RejectedCredentialsServiceException, BadProviderDataServiceException {
  2. String errorCode = e.getPowerIdResponse().getError();
  3. String errorMessage = e.getPowerIdResponse().getMessage();
  4. String messagePowerId = (errorCode == null ? "" : errorCode + " - ") + errorMessage;
  5.  
  6. if (USR_BLOQ_CODE.equals(errorCode) || USR_BLOQ_MESSAGE.equals(errorMessage)) {
  7. throw blockedCredentialsServiceException("PowerId: " + messagePowerId);
  8. }
  9. if(USR_BLOQ_SEG_CODE.equals(errorCode)){
  10. throw blockedUserforFraudeServiceException("PowerId: " + (errorCode == null ? "" : errorCode + " - ") + errorMessage);
  11. }
  12.  
  13. throw new BadProviderDataServiceException("PowerId: " + messagePowerId, e);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement