Skip to content

Commit

Permalink
MsGraphConnectorException is replaced by SKException
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyMenshykh committed Jul 18, 2023
1 parent 29bb3ba commit 582d560
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 38 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Graph;
using Microsoft.SemanticKernel.Diagnostics;
using Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Diagnostics;
using Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Exceptions;
using Microsoft.SemanticKernel.Skills.MsGraph.Models;
using TaskStatus = Microsoft.Graph.TaskStatus;

Expand Down Expand Up @@ -50,7 +50,7 @@ public MicrosoftToDoConnector(GraphServiceClient graphServiceClient)

if (result == null)
{
throw new MsGraphConnectorException("Could not find default task list.");
throw new SKException("Could not find default task list.");
}

return new TaskManagementTaskList(result.Id, result.DisplayName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Graph;
using Microsoft.SemanticKernel.Diagnostics;
using Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Diagnostics;
using Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Exceptions;

namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors;

/// <summary>
Expand Down Expand Up @@ -108,7 +107,7 @@ public async Task UploadSmallFileAsync(string filePath, string destinationPath,
string? result = (await response.GetResponseObjectAsync().ConfigureAwait(false)).Link?.WebUrl;
if (string.IsNullOrWhiteSpace(result))
{
throw new MsGraphConnectorException("Shareable file link was null or whitespace.");
throw new SKException("Shareable file link was null or whitespace.");
}

return result!;
Expand Down

0 comments on commit 582d560

Please sign in to comment.