public async Task <ActionResult> DeleteNote(int id) { var reponse = await SecuredNotesClient.DeleteAsync(string.Format("api/notes/{0}", id)).ConfigureAwait(false); if (reponse.IsSuccessStatusCode) { return(RedirectToAction("Index")); } return(View("Error", new HandleErrorInfo(ExceptionHelper.GetExceptionFromResponse(reponse), "Notes", "Index"))); }