BookServiceClientApp.Program.ReadNotExistingChapterAsync C# (CSharp) Метод

ReadNotExistingChapterAsync() приватный статический Метод

private static ReadNotExistingChapterAsync ( ) : Task
Результат Task
        private static async Task ReadNotExistingChapterAsync()
        {
           
            WriteLine(nameof(ReadNotExistingChapterAsync));
            string requestedIdentifier = Guid.NewGuid().ToString();
            try
            {
                var client = new BookChapterClient(Addresses.BaseAddress);
                BookChapter chapter = await client.GetAsync(Addresses.BooksApi + requestedIdentifier.ToString());
                WriteLine($"{chapter.Number} {chapter.Title}");
            }
            catch (HttpRequestException ex) when (ex.Message.Contains("404")) 
            {
                WriteLine($"book chapter with the identifier {requestedIdentifier} not found");
            }
            WriteLine();
        }