| Line 75... |
Line 75... |
| 75 |
final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), ProfitMandiConstants.URL_GENERATE_OTP , HttpStatus.OK.toString(), HttpStatus.OK, ResponseStatus.SUCCESS, otpResponse);
|
75 |
final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), ProfitMandiConstants.URL_GENERATE_OTP , HttpStatus.OK.toString(), HttpStatus.OK, ResponseStatus.SUCCESS, otpResponse);
|
| 76 |
return new ResponseEntity<>(profitMandiResponse,HttpStatus.OK);
|
76 |
return new ResponseEntity<>(profitMandiResponse,HttpStatus.OK);
|
| 77 |
} catch (Exception | ProfitMandiBusinessException e) {
|
77 |
} catch (Exception | ProfitMandiBusinessException e) {
|
| 78 |
logger.error("Error while generating otp ",e);
|
78 |
logger.error("Error while generating otp ",e);
|
| 79 |
otpResponse = new OTPResponse();
|
79 |
otpResponse = new OTPResponse();
|
| 80 |
otpResponse.setMessage(e.getMessage());
|
80 |
otpResponse.setMessage("Unable to generate OTP, Please try again");
|
| 81 |
final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), ProfitMandiConstants.URL_GENERATE_OTP , HttpStatus.INTERNAL_SERVER_ERROR.toString(), HttpStatus.INTERNAL_SERVER_ERROR, ResponseStatus.FAILURE, otpResponse);
|
81 |
final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), ProfitMandiConstants.URL_GENERATE_OTP , HttpStatus.INTERNAL_SERVER_ERROR.toString(), HttpStatus.INTERNAL_SERVER_ERROR, ResponseStatus.FAILURE, otpResponse);
|
| 82 |
return new ResponseEntity<>(profitMandiResponse,HttpStatus.INTERNAL_SERVER_ERROR);
|
82 |
return new ResponseEntity<>(profitMandiResponse,HttpStatus.INTERNAL_SERVER_ERROR);
|
| 83 |
}
|
83 |
}
|
| 84 |
}
|
84 |
}
|
| 85 |
|
85 |
|
| Line 98... |
Line 98... |
| 98 |
final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), ProfitMandiConstants.URL_VERIFY_OTP , HttpStatus.OK.toString(), HttpStatus.OK, ResponseStatus.SUCCESS, otpResponse);
|
98 |
final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), ProfitMandiConstants.URL_VERIFY_OTP , HttpStatus.OK.toString(), HttpStatus.OK, ResponseStatus.SUCCESS, otpResponse);
|
| 99 |
return new ResponseEntity<>(profitMandiResponse,HttpStatus.OK);
|
99 |
return new ResponseEntity<>(profitMandiResponse,HttpStatus.OK);
|
| 100 |
} catch (Exception | ProfitMandiBusinessException e) {
|
100 |
} catch (Exception | ProfitMandiBusinessException e) {
|
| 101 |
logger.error("Error while generating otp ",e);
|
101 |
logger.error("Error while generating otp ",e);
|
| 102 |
otpResponse = new OTPResponse();
|
102 |
otpResponse = new OTPResponse();
|
| 103 |
otpResponse.setMessage(e.getMessage());
|
103 |
otpResponse.setMessage("Unable to verify OTP, please try again");
|
| 104 |
final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), ProfitMandiConstants.URL_VERIFY_OTP , HttpStatus.INTERNAL_SERVER_ERROR.toString(), HttpStatus.INTERNAL_SERVER_ERROR, ResponseStatus.FAILURE, otpResponse);
|
104 |
final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), ProfitMandiConstants.URL_VERIFY_OTP , HttpStatus.INTERNAL_SERVER_ERROR.toString(), HttpStatus.INTERNAL_SERVER_ERROR, ResponseStatus.FAILURE, otpResponse);
|
| 105 |
return new ResponseEntity<>(profitMandiResponse,HttpStatus.INTERNAL_SERVER_ERROR);
|
105 |
return new ResponseEntity<>(profitMandiResponse,HttpStatus.INTERNAL_SERVER_ERROR);
|
| 106 |
}
|
106 |
}
|
| 107 |
}
|
107 |
}
|
| 108 |
|
108 |
|