private static void ShowAgency(IamClient iamClient) { var showAgencyRequest = new ShowAgencyRequest() { AgencyId = "" }; try { var showAgencyResponse = iamClient.ShowAgency(showAgencyRequest); Console.WriteLine(JsonConvert.SerializeObject(showAgencyResponse.Agency)); } catch (RequestTimeoutException requestTimeoutException) { Console.WriteLine(requestTimeoutException.ErrorMessage); } catch (ServiceResponseException clientRequestException) { Console.WriteLine(clientRequestException.HttpStatusCode); Console.WriteLine(clientRequestException.ErrorCode); Console.WriteLine(clientRequestException.ErrorMsg); } catch (ConnectionException connectionException) { Console.WriteLine(connectionException.ErrorMessage); } }