public ActionResult <string> EditContactInformation(ContactModel contact) { try { var errorMessage = _contactManager.ValidateContact(contact, false); if (string.IsNullOrEmpty(errorMessage)) { var id = _contactManager.EditContactInformation(contact); if (id > 0) { return(Ok($"Contact successfully updated with Id: {id}")); } else { return(NotFound($"Contact not found.")); } } else { return(ValidationProblem(new ValidationProblemDetails() { Detail = errorMessage })); } } catch (Exception ex) { Log.Error(ex.Message); return(Ok("Something went wrong. Please try again.")); } }