public IHttpActionResult AddContactAddress(AddressModel model) { if (!ModelState.IsValid) { return(InternalServerError(new Exception("Invalid model state"))); } UserAddresses newAddress; try { Users currentUser = GetUser(); newAddress = ContactService.AddContactAddress(currentUser.Id, model.StreetName, model.City, model.Country, model.Latitude, model.Longitude); } catch (Exception ex) { return(InternalServerError(ex)); } return(Ok(newAddress)); }