public IActionResult GetAircraft([FromRoute] int aircraftId) { var response = new GetAircraftResponse(); try { response = _aircraftService.GetAircraft(new GetAircraftRequest { AircraftId = aircraftId }); } catch (Exception ex) { return(BadRequest(ex.ToString())); } if (response.IsSuccessful) { return(Ok(response.Aircraft)); } else { return(BadRequest(response.ToString())); } }