public HttpResponseMessage Add(FavoriteCityInputModel model) { try { var inputModel = new FavoriteCityDtoInputModel { Id = model.Id, Name = model.Name }; return(Request.CreateResponse(HttpStatusCode.OK, WeatherService.AddToFavoriteCity(inputModel))); } catch (Exception e) { var message = $"Failed to get thumbnail record."; return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, $"{message}, error: {e.Message}")); } }