public IHttpActionResult ConfirmSecurityQuestionAnswers([FromBody] ResetPasswordDto resetPasswordDto) { // Model Binding Validation if (!ModelState.IsValid) { return(BadRequest(GeneralErrorMessages.MODEL_STATE_ERROR)); } try { var resetPasswordManager = new ResetPasswordManager(resetPasswordDto); var response = resetPasswordManager.ConfirmSecurityQuestionAnswers(); if (response.Error != null) { return(BadRequest(response.Error)); } // Sending HTTP response 200 Status return(Ok()); } // Catch exceptions catch (Exception) { // Sending HTTP response 400 Status return(InternalServerError()); } }