Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adds exception block for handling unauthorized exception #3604

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;
using Azure;
using EnsureThat;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Primitives;
Expand Down Expand Up @@ -111,6 +112,12 @@ public async Task<string> ExecuteAsync(JobInfo jobInfo, IProgress<string> progre
{
throw;
}
catch (RequestFailedException ex) when (ex.Status == 403)
{
_logger.LogInformation(ex, "Import processing operation is failed.");
var error = new ImportProcessingJobErrorResult() { Message = "Import processing operation is failed." };
throw new JobExecutionException(ex.Message, error, ex);
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to load data.");
Expand Down