public HttpResponseMessage ActiveStatus(string id, string token) { try { //check token info var isAllow = iAccountService.IsTokenAvailable(token); if (!isAllow) { return(PostResponseFail(HttpStatusCode.ExpectationFailed, ExceptionMessageConstant.TokenNotAvailable)); } //proceed request var tokenizedUserId = iAccountService.GetUserIdByToken(token); iStatusService.ActiveStatus(id, tokenizedUserId); return(PostResponseSuccess(HttpStatusCode.OK, SucessMessageConstant.RequestHandleSuccessful)); } catch (NullReferenceException) { return(PostResponseFail(HttpStatusCode.ExpectationFailed, ExceptionMessageConstant.RequestNullExceptionMassge)); } catch (Exception ex) { return(PostResponseFail(HttpStatusCode.ExpectationFailed, ex.Message)); } }