public IActionResult UpdateAirport([FromBody] Airport airport) { var response = new PutAirportResponse(); try { response = _airportService.PutAirport(new PutAirportRequest { UpdatedAirport = airport }); } catch (Exception ex) { return(BadRequest(ex.ToString())); } if (response.IsSuccessful) { return(Ok(response.Message)); } else { return(BadRequest(response.Message)); } }