Skip to content

Commit

Permalink
Merge pull request #277 from dvonthenen/rest-exception-surfacing
Browse files Browse the repository at this point in the history
Return Deepgram REST Error to User + JSON Serialize for Topics
  • Loading branch information
davidvonthenen authored Apr 22, 2024
2 parents 97b0153 + 6584f72 commit 8c64e35
Show file tree
Hide file tree
Showing 158 changed files with 1,346 additions and 364 deletions.
10 changes: 10 additions & 0 deletions Deepgram.Dev.sln
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Factory", "examples\speak\f
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Factory", "examples\streaming\factory_example\Factory.csproj", "{2A876DE1-0D84-4FF5-BE82-7C393B6697B7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "throw_exception", "throw_exception", "{02746530-6811-4F1B-8851-544C89CA66DA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThrowException", "tests\expected_failures\rest\throw_exception\ThrowException.csproj", "{B98F6A00-292E-431F-8B11-0CFCA5FD1E37}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -309,6 +313,10 @@ Global
{2A876DE1-0D84-4FF5-BE82-7C393B6697B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A876DE1-0D84-4FF5-BE82-7C393B6697B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A876DE1-0D84-4FF5-BE82-7C393B6697B7}.Release|Any CPU.Build.0 = Release|Any CPU
{B98F6A00-292E-431F-8B11-0CFCA5FD1E37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B98F6A00-292E-431F-8B11-0CFCA5FD1E37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B98F6A00-292E-431F-8B11-0CFCA5FD1E37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B98F6A00-292E-431F-8B11-0CFCA5FD1E37}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -389,6 +397,8 @@ Global
{CB254D55-5C90-4EAF-8EE7-5C9C284317E7} = {6DFDB911-5172-44F0-A3F1-98C301D7B26F}
{3DD86C52-7EF9-4F96-B057-58DFA30CCD27} = {C5428CBF-4741-46E6-A721-AF00716CBAA8}
{2A876DE1-0D84-4FF5-BE82-7C393B6697B7} = {2B3AF9D0-879A-4B8A-A6EC-0C95F36A1DC5}
{02746530-6811-4F1B-8851-544C89CA66DA} = {7FA977F3-415E-4681-B316-5C273DF3A1C6}
{B98F6A00-292E-431F-8B11-0CFCA5FD1E37} = {02746530-6811-4F1B-8851-544C89CA66DA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8D4ABC6D-7126-4EE2-9303-43A954616B2A}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
using Deepgram.Models.Authenticate.v1;
using Deepgram.Models.Manage.v1;
using Deepgram.Models.PreRecorded.v1;
using Deepgram.Models.Exceptions.v1;

using Deepgram.Clients.Manage.v1;

namespace Deepgram.Tests.UnitTests.ClientTests;
Expand Down Expand Up @@ -127,14 +129,14 @@ public void PostAsync_Should_Throw_HttpRequestException_On_UnsuccessfulResponse(
public async Task Delete_Should_Throws_HttpRequestException_On_Response_Containing_Error()
{
// Input and Output
var httpClient = MockHttpClient.CreateHttpClientWithException(new HttpRequestException());
var httpClient = MockHttpClient.CreateHttpClientWithException(new DeepgramException());

// Fake Clients
var client = new ConcreteRestClient(_apiKey, _clientOptions);

// Act & Assert
await client.Invoking(async y => await y.DeleteAsync<MessageResponse>($"{Defaults.DEFAULT_URI}/{UriSegments.PROJECTS}"))
.Should().ThrowAsync<HttpRequestException>();
.Should().ThrowAsync<DeepgramException>();
}

//Test for the delete calls that do not return a value
Expand Down
112 changes: 56 additions & 56 deletions Deepgram.Tests/UnitTests/ClientTests/PrerecordedClientTests.cs

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Deepgram.Tests/UnitTests/UtilitiesTests/QueryParameterUtilTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class QueryParameterUtilTests
public void GetParameters_Should_Return_EmptyString_When_Parameters_Is_Null()
{
// Input and Output
PrerecordedSchema? para = null;
PreRecordedSchema? para = null;
var expected = $"https://{Defaults.DEFAULT_URI}";

//Act
Expand All @@ -27,7 +27,7 @@ public void GetParameters_Should_Return_EmptyString_When_Parameters_Is_Null()
public void GetParameters_Should_Return_String_When_Passing_String_Parameter()
{
// Input and Output
var prerecordedOptions = new AutoFaker<PrerecordedSchema>().Generate();
var prerecordedOptions = new AutoFaker<PreRecordedSchema>().Generate();
var expectedModel = HttpUtility.UrlEncode(prerecordedOptions.Model)!;
var expected = $"{nameof(prerecordedOptions.Model).ToLower()}={expectedModel}";
//Act
Expand All @@ -42,7 +42,7 @@ public void GetParameters_Should_Return_String_When_Passing_String_Parameter()
public void GetParameters_Should_Return_String_Respecting_CallBack_Casing()
{
// Input and Output
var prerecordedOptions = new AutoFaker<PrerecordedSchema>().Generate();
var prerecordedOptions = new AutoFaker<PreRecordedSchema>().Generate();
prerecordedOptions.CallBack = "https://Signed23.com";
var expected = $"{nameof(prerecordedOptions.CallBack).ToLower()}={HttpUtility.UrlEncode("https://Signed23.com")}";
//Act
Expand All @@ -57,7 +57,7 @@ public void GetParameters_Should_Return_String_Respecting_CallBack_Casing()
public void GetParameters_Should_Return_String_When_Passing_Int_Parameter()
{
// Input and Output
var obj = new PrerecordedSchema() { Alternatives = 1 };
var obj = new PreRecordedSchema() { Alternatives = 1 };
var expected = $"alternatives={obj.Alternatives}";

//Act
Expand All @@ -72,7 +72,7 @@ public void GetParameters_Should_Return_String_When_Passing_Int_Parameter()
public void GetParameters_Should_Return_String_When_Passing_Array_Parameter()
{
// Input and Output
var prerecordedOptions = new PrerecordedSchema
var prerecordedOptions = new PreRecordedSchema
{
Keywords = ["test", "acme"]
};
Expand All @@ -89,7 +89,7 @@ public void GetParameters_Should_Return_String_When_Passing_Array_Parameter()
public void GetParameters_Should_Return_String_When_Passing_Dictonary_Parameter()
{
// Input and Output
var prerecordedOptions = new PrerecordedSchema()
var prerecordedOptions = new PreRecordedSchema()
{
Extra = new Dictionary<string, string>
{
Expand All @@ -111,7 +111,7 @@ public void GetParameters_Should_Return_String_When_Passing_Dictonary_Parameter(
public void GetParameters_Should_Return_String_When_Passing_Decimal_Parameter()
{
// Input and Output
var prerecordedOptions = new PrerecordedSchema() { UttSplit = 2.3 };
var prerecordedOptions = new PreRecordedSchema() { UttSplit = 2.3 };
var expected = $"utt_split={HttpUtility.UrlEncode(prerecordedOptions.UttSplit.ToString())}";

//Act
Expand All @@ -128,7 +128,7 @@ public void GetParameters_Should_Return_String_When_Passing_Decimal_Parameter()
public void GetParameters_Should_Return_String_When_Passing_Boolean_Parameter()
{
// Input and Output
var obj = new PrerecordedSchema() { Paragraphs = true };
var obj = new PreRecordedSchema() { Paragraphs = true };
var expected = $"{nameof(obj.Paragraphs).ToLower()}=true";
//Act
var result = QueryParameterUtil.FormatURL(Defaults.DEFAULT_URI, obj);
Expand Down Expand Up @@ -164,7 +164,7 @@ public void GetParameters_Should_Return_Valid_String_When_CallBack_Set()
var expected = HttpUtility.UrlEncode(signedCallBackUrl);

//Act
var result = QueryParameterUtil.FormatURL(Defaults.DEFAULT_URI, new PrerecordedSchema() { CallBack = signedCallBackUrl, Diarize = true });
var result = QueryParameterUtil.FormatURL(Defaults.DEFAULT_URI, new PreRecordedSchema() { CallBack = signedCallBackUrl, Diarize = true });

//Assert
result.Should().NotBeNull();
Expand All @@ -175,7 +175,7 @@ public void GetParameters_Should_Return_Valid_String_When_CallBack_Set()
public void GetParameters_Should_Return_Empty_String_When_Parameter_Has_No_Values()
{
//Act
var result = QueryParameterUtil.FormatURL(Defaults.DEFAULT_URI, new PrerecordedSchema());
var result = QueryParameterUtil.FormatURL(Defaults.DEFAULT_URI, new PreRecordedSchema());

//Assert
result.Should().NotBeNull();
Expand Down
120 changes: 105 additions & 15 deletions Deepgram/Abstractions/AbstractRestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using Deepgram.Encapsulations;
using Deepgram.Models.Authenticate.v1;
using Deepgram.Models.Exceptions.v1;

namespace Deepgram.Abstractions;

Expand Down Expand Up @@ -81,7 +82,14 @@ public virtual async Task<T> GetAsync<T>(string uriSegment, CancellationTokenSou
// do the request
Log.Verbose("GetAsync<T>", "Calling _httpClient.SendAsync...");
var response = await _httpClient.SendAsync(request, cancellationToken.Token);
response.EnsureSuccessStatusCode();

var resultStr = response.Content.ReadAsStringAsync().Result;
if (!response.IsSuccessStatusCode)
{
await ThrowException("GetAsync<T>", response, resultStr);
}

Log.Verbose("GetAsync<T>", $"Response:\n{resultStr}");
var result = await HttpRequestUtil.DeserializeAsync<T>(response);

Log.Debug("GetAsync<T>", "Succeeded");
Expand Down Expand Up @@ -137,7 +145,14 @@ public virtual async Task<T> GetAsync<S, T>(string uriSegment, S? parameter, Can
// do the request
Log.Verbose("GetAsync<S, T>", "Calling _httpClient.SendAsync...");
var response = await _httpClient.SendAsync(request, cancellationToken.Token);
response.EnsureSuccessStatusCode();

var resultStr = response.Content.ReadAsStringAsync().Result;
if (!response.IsSuccessStatusCode)
{
await ThrowException("GetAsync<S, T>", response, resultStr);
}

Log.Verbose("GetAsync<S, T>", $"Response:\n{resultStr}");
var result = await HttpRequestUtil.DeserializeAsync<T>(response);

Log.Debug("GetAsync<S, T>", "Succeeded");
Expand Down Expand Up @@ -207,7 +222,11 @@ public virtual async Task<LocalFileWithMetadata> PostRetrieveLocalFileAsync<R, S
// do the request
Log.Verbose("PostRetrieveLocalFileAsync<R, S, T>", "Calling _httpClient.SendAsync...");
var response = await _httpClient.SendAsync(request, cancellationToken.Token);
response.EnsureSuccessStatusCode();

if (!response.IsSuccessStatusCode)
{
await ThrowException("PostRetrieveLocalFileAsync<R, S, T>", response, response.Content.ReadAsStringAsync().Result);
}

var result = new Dictionary<string, string>();

Expand Down Expand Up @@ -322,10 +341,17 @@ public virtual async Task<T> PostAsync<S, T>(string uriSegment, S? parameter, Ca
// do the request
Log.Verbose("PostAsync<S, T>", "Calling _httpClient.SendAsync...");
var response = await _httpClient.SendAsync(request, cancellationToken.Token);
response.EnsureSuccessStatusCode();

var resultStr = response.Content.ReadAsStringAsync().Result;
if (!response.IsSuccessStatusCode)
{
await ThrowException("PostAsync<S, T>", response, resultStr);
}

Log.Verbose("PostAsync<S, T>", $"Response:\n{resultStr}");
var result = await HttpRequestUtil.DeserializeAsync<T>(response);

Log.Debug("PostAsync<S, T>", $"Succeeded. Result: {result}");
Log.Debug("PostAsync<S, T>", $"Succeeded");
Log.Verbose("AbstractRestClient.PostAsync<S, T>", "LEAVE");

return result;
Expand Down Expand Up @@ -392,10 +418,17 @@ public virtual async Task<T> PostAsync<R, S, T>(string uriSegment, S? parameter,
// do the request
Log.Verbose("PostAsync<R, S, T>", "Calling _httpClient.SendAsync...");
var response = await _httpClient.SendAsync(request, cancellationToken.Token);
response.EnsureSuccessStatusCode();

var resultStr = response.Content.ReadAsStringAsync().Result;
if (!response.IsSuccessStatusCode)
{
await ThrowException("PostAsync<R, S, T>", response, resultStr);
}

Log.Verbose("PostAsync<R, S, T>", $"Response:\n{resultStr}");
var result = await HttpRequestUtil.DeserializeAsync<T>(response);

Log.Debug("PostAsync<R, S, T>", $"Succeeded. Result: {result}");
Log.Debug("PostAsync<R, S, T>", $"Succeeded");
Log.Verbose("AbstractRestClient.PostAsync<R, S, T>", "LEAVE");

return result;
Expand Down Expand Up @@ -465,10 +498,17 @@ public virtual async Task<T> PatchAsync<S, T>(string uriSegment, S? parameter, C
// do the request
Log.Verbose("PatchAsync<S, T>", "Calling _httpClient.SendAsync...");
var response = await _httpClient.SendAsync(request, cancellationToken.Token);
response.EnsureSuccessStatusCode();

var resultStr = response.Content.ReadAsStringAsync().Result;
if (!response.IsSuccessStatusCode)
{
await ThrowException("PatchAsync<S, T>", response, resultStr);
}

Log.Verbose("PatchAsync<S, T>", $"Response:\n{resultStr}");
var result = await HttpRequestUtil.DeserializeAsync<T>(response);

Log.Debug("PatchAsync<S, T>", $"Succeeded. Result: {result}");
Log.Debug("PatchAsync<S, T>", $"Succeeded");
Log.Verbose("AbstractRestClient.PatchAsync<S, T>", "LEAVE");

return result;
Expand Down Expand Up @@ -536,10 +576,17 @@ public virtual async Task<T> PutAsync<S, T>(string uriSegment, S? parameter, Can
// do the request
Log.Verbose("PutAsync<S, T>", "Calling _httpClient.SendAsync...");
var response = await _httpClient.SendAsync(request, cancellationToken.Token);
response.EnsureSuccessStatusCode();

var resultStr = response.Content.ReadAsStringAsync().Result;
if (!response.IsSuccessStatusCode)
{
await ThrowException("PutAsync<S, T>", response, resultStr);
}

Log.Verbose("PutAsync<S, T>", $"Response:\n{resultStr}");
var result = await HttpRequestUtil.DeserializeAsync<T>(response);

Log.Debug("PutAsync<S, T>", $"Succeeded. Result: {result}");
Log.Debug("PutAsync<S, T>", $"Succeeded");
Log.Verbose("AbstractRestClient.PutAsync<S, T>", "LEAVE");

return result;
Expand Down Expand Up @@ -597,10 +644,17 @@ public virtual async Task<T> DeleteAsync<T>(string uriSegment, CancellationToken
// do the request
Log.Verbose("DeleteAsync<T>", "Calling _httpClient.SendAsync...");
var response = await _httpClient.SendAsync(request, cancellationToken.Token);
response.EnsureSuccessStatusCode();

var resultStr = response.Content.ReadAsStringAsync().Result;
if (!response.IsSuccessStatusCode)
{
await ThrowException("DeleteAsync<T>", response, resultStr);
}

Log.Verbose("DeleteAsync<T>", $"Response:\n{resultStr}");
var result = await HttpRequestUtil.DeserializeAsync<T>(response);

Log.Debug("DeleteAsync<T>", $"Succeeded. Result: {result}");
Log.Debug("DeleteAsync<T>", $"Succeeded");
Log.Verbose("AbstractRestClient.DeleteAsync<T>", "LEAVE");

return result;
Expand Down Expand Up @@ -660,10 +714,17 @@ public virtual async Task<T> DeleteAsync<S, T>(string uriSegment, S? parameter,
// do the request
Log.Verbose("DeleteAsync<S, T>", "Calling _httpClient.SendAsync...");
var response = await _httpClient.SendAsync(request, cancellationToken.Token);
response.EnsureSuccessStatusCode();

var resultStr = response.Content.ReadAsStringAsync().Result;
if (!response.IsSuccessStatusCode)
{
await ThrowException("DeleteAsync<S, T>", response, resultStr);
}

Log.Verbose("DeleteAsync<S, T>", $"Response:\n{resultStr}");
var result = await HttpRequestUtil.DeserializeAsync<T>(response);

Log.Debug("DeleteAsync<S, T>", $"Succeeded. Result: {result}");
Log.Debug("DeleteAsync<S, T>", $"Succeeded");
Log.Verbose("AbstractRestClient.DeleteAsync<S, T>", "LEAVE");

return result;
Expand All @@ -684,6 +745,35 @@ public virtual async Task<T> DeleteAsync<S, T>(string uriSegment, S? parameter,
}
}

private static async Task ThrowException(string module, HttpResponseMessage response, string errMsg)
{
if (errMsg == null || errMsg.Length == 0)
{
Log.Verbose(module, $"HTTP/REST Exception thrown");
response.EnsureSuccessStatusCode(); // this throws the exception
}

Log.Verbose(module, $"Deepgram Exception: {errMsg}");
DeepgramRESTException? resException = null;
try
{
resException = await HttpRequestUtil.DeserializeAsync<DeepgramRESTException>(response);
}
catch (Exception ex)
{
Log.Verbose(module, $"DeserializeAsync Error Exception: {ex}");
}

if (resException != null)
{
Log.Verbose(module, "DeepgramRESTException thrown");
throw resException;
}

Log.Verbose(module, $"Deepgram Generic Exception thrown");
throw new DeepgramException(errMsg);

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (6.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (6.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (6.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (6.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (7.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (7.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (7.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (7.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (8.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (8.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (8.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.

Check warning on line 774 in Deepgram/Abstractions/AbstractRestClient.cs

View workflow job for this annotation

GitHub Actions / test (8.0.x)

Possible null reference argument for parameter 'errMsg' in 'DeepgramException.DeepgramException(string errMsg)'.
}

internal static string GetUri(IDeepgramClientOptions options, string path)
{
return $"{options.BaseAddress}/{path}";
Expand Down
4 changes: 2 additions & 2 deletions Deepgram/Clients/Analyze/v1/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public async Task<SyncResponse> AnalyzeFile(Stream source, AnalyzeSchema? analyz
{
Log.Verbose("AnalyzeClient.AnalyzeFile", "ENTER");
Log.Information("AnalyzeFile", $"source: {source}");
Log.Information("AnalyzeFile", $"analyzeSchema:\n{JsonSerializer.Serialize(analyzeSchema, JsonSerializeOptions.DefaultOptions)}");
Log.Information("AnalyzeFile", $"analyzeSchema:\n{analyzeSchema}");

VerifyNoCallBack(nameof(AnalyzeFile), analyzeSchema);

Expand Down Expand Up @@ -109,7 +109,7 @@ public async Task<AsyncResponse> AnalyzeFileCallBack(Stream source, string? call
Log.Verbose("AnalyzeClient.AnalyzeFileCallBack", "ENTER");
Log.Information("AnalyzeFileCallBack", $"source: {source}");
Log.Information("AnalyzeFileCallBack", $"callBack: {callBack}");
Log.Information("AnalyzeFileCallBack", $"analyzeSchema:\n{JsonSerializer.Serialize(analyzeSchema, JsonSerializeOptions.DefaultOptions)}");
Log.Information("AnalyzeFileCallBack", $"analyzeSchema:\n{analyzeSchema}");

VerifyOneCallBackSet(nameof(AnalyzeFileCallBack), callBack, analyzeSchema);
if (callBack != null)
Expand Down
Loading

0 comments on commit 8c64e35

Please sign in to comment.