Skip to content

Commit

Permalink
Merge pull request #38 from Team-Wilhelm/main
Browse files Browse the repository at this point in the history
Log Azure errors
  • Loading branch information
juuwel authored May 29, 2024
2 parents 243740c + 62b1368 commit c144d82
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Net.Http.Headers;
using api.Core.Options;
using Microsoft.Extensions.Options;
using Serilog;
using Shared.Exceptions;

namespace api.Core.Services.External.BackgroundRemoval;
Expand All @@ -24,6 +25,8 @@ public async Task<byte[]> RemoveBackground(byte[] imageBytes)

if (response.StatusCode != HttpStatusCode.OK)
{
Log.Error(response.StatusCode.ToString());
Log.Error(response.Content.ReadAsStringAsync().Result);
throw new AppException("Failed to remove background from image.");
}

Expand Down

0 comments on commit c144d82

Please sign in to comment.