예제 #1
0
 /// <summary> Updates the thread's topic asynchronously. </summary>
 /// <param name="topic"> Chat thread topic. </param>
 /// <param name="cancellationToken"> The cancellation token to use. </param>
 /// <exception cref="RequestFailedException">The server returned an error. See <see cref="Exception.Message"/> for details returned from the server.</exception>
 public virtual async Task <Response> UpdateTopicAsync(string topic, CancellationToken cancellationToken = default)
 {
     using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(ChatThreadClient)}.{nameof(UpdateTopic)}");
     scope.Start();
     try
     {
         return(await _chatThreadRestClient.UpdateChatThreadAsync(Id, topic, cancellationToken).ConfigureAwait(false));
     }
     catch (Exception ex)
     {
         scope.Failed(ex);
         throw;
     }
 }