diff --git a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs index f816a4a..15d808c 100644 --- a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs @@ -337,13 +337,13 @@ partial void ProcessGetAudienceByIdResponseContent( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -354,7 +354,7 @@ partial void ProcessGetAudienceByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -374,13 +374,13 @@ partial void ProcessGetAudienceByIdResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -391,7 +391,7 @@ partial void ProcessGetAudienceByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -434,7 +434,7 @@ partial void ProcessGetAudienceByIdResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -479,7 +479,7 @@ partial void ProcessGetAudienceByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs index dfc5a31..c2d94b2 100644 --- a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs @@ -328,13 +328,13 @@ partial void ProcessGetAudiencesResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -345,7 +345,7 @@ partial void ProcessGetAudiencesResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -388,7 +388,7 @@ partial void ProcessGetAudiencesResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -433,7 +433,7 @@ partial void ProcessGetAudiencesResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs b/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs index 9509fae..a0ed6a6 100644 --- a/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs @@ -348,13 +348,13 @@ partial void ProcessCommandResponseContent( if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -365,7 +365,7 @@ partial void ProcessCommandResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -385,13 +385,13 @@ partial void ProcessCommandResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -402,7 +402,7 @@ partial void ProcessCommandResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -445,7 +445,7 @@ partial void ProcessCommandResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -490,7 +490,7 @@ partial void ProcessCommandResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs index 3b53845..cc26013 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs @@ -348,13 +348,13 @@ partial void ProcessCreateDocumentResponseContent( if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -365,7 +365,7 @@ partial void ProcessCreateDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -385,13 +385,13 @@ partial void ProcessCreateDocumentResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -402,7 +402,7 @@ partial void ProcessCreateDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -445,7 +445,7 @@ partial void ProcessCreateDocumentResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -490,7 +490,7 @@ partial void ProcessCreateDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs index 85884b5..2bed951 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs @@ -330,13 +330,13 @@ await DeleteDocumentByIdAsResponseAsync( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -347,7 +347,7 @@ await DeleteDocumentByIdAsResponseAsync( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -367,13 +367,13 @@ await DeleteDocumentByIdAsResponseAsync( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -384,7 +384,7 @@ await DeleteDocumentByIdAsResponseAsync( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -420,7 +420,7 @@ await DeleteDocumentByIdAsResponseAsync( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -456,7 +456,7 @@ await DeleteDocumentByIdAsResponseAsync( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs index ae12b9a..ac0978e 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs @@ -418,13 +418,13 @@ partial void ProcessGetAllDocumentsResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -435,7 +435,7 @@ partial void ProcessGetAllDocumentsResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -478,7 +478,7 @@ partial void ProcessGetAllDocumentsResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -523,7 +523,7 @@ partial void ProcessGetAllDocumentsResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs index d4628f5..1648a8c 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs @@ -337,13 +337,13 @@ partial void ProcessGetDocumentByIdResponseContent( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -354,7 +354,7 @@ partial void ProcessGetDocumentByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -374,13 +374,13 @@ partial void ProcessGetDocumentByIdResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -391,7 +391,7 @@ partial void ProcessGetDocumentByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -434,7 +434,7 @@ partial void ProcessGetDocumentByIdResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -479,7 +479,7 @@ partial void ProcessGetDocumentByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs index bb08055..76706d3 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs @@ -357,13 +357,13 @@ partial void ProcessUpdateDocumentResponseContent( if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -374,7 +374,7 @@ partial void ProcessUpdateDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -394,13 +394,13 @@ partial void ProcessUpdateDocumentResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -411,7 +411,7 @@ partial void ProcessUpdateDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -454,7 +454,7 @@ partial void ProcessUpdateDocumentResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -499,7 +499,7 @@ partial void ProcessUpdateDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs index 35ad81b..2b6eb56 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs @@ -330,13 +330,13 @@ await DeleteKnowledgeDocumentAsResponseAsync( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -347,7 +347,7 @@ await DeleteKnowledgeDocumentAsResponseAsync( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -367,13 +367,13 @@ await DeleteKnowledgeDocumentAsResponseAsync( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -384,7 +384,7 @@ await DeleteKnowledgeDocumentAsResponseAsync( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -420,7 +420,7 @@ await DeleteKnowledgeDocumentAsResponseAsync( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -456,7 +456,7 @@ await DeleteKnowledgeDocumentAsResponseAsync( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs index de504e5..edd1e7d 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs @@ -337,13 +337,13 @@ partial void ProcessGetKnowledgeDocumentResponseContent( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -354,7 +354,7 @@ partial void ProcessGetKnowledgeDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -374,13 +374,13 @@ partial void ProcessGetKnowledgeDocumentResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -391,7 +391,7 @@ partial void ProcessGetKnowledgeDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -434,7 +434,7 @@ partial void ProcessGetKnowledgeDocumentResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -479,7 +479,7 @@ partial void ProcessGetKnowledgeDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs index 0760479..389b98d 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs @@ -360,13 +360,13 @@ partial void ProcessGetKnowledgeDocumentsResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -377,7 +377,7 @@ partial void ProcessGetKnowledgeDocumentsResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -420,7 +420,7 @@ partial void ProcessGetKnowledgeDocumentsResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -465,7 +465,7 @@ partial void ProcessGetKnowledgeDocumentsResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs index b36075b..fa852bc 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs @@ -348,13 +348,13 @@ partial void ProcessSearchKnowledgeResponseContent( if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -365,7 +365,7 @@ partial void ProcessSearchKnowledgeResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -385,13 +385,13 @@ partial void ProcessSearchKnowledgeResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -402,7 +402,7 @@ partial void ProcessSearchKnowledgeResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -445,7 +445,7 @@ partial void ProcessSearchKnowledgeResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -490,7 +490,7 @@ partial void ProcessSearchKnowledgeResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs index 7fb8562..082df70 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs @@ -357,13 +357,13 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -374,7 +374,7 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -394,13 +394,13 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -411,7 +411,7 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -454,7 +454,7 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -499,7 +499,7 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs index 47d21e3..5140e8d 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs @@ -421,13 +421,13 @@ request.Filename is null if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -438,7 +438,7 @@ request.Filename is null throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -458,13 +458,13 @@ request.Filename is null if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -475,7 +475,7 @@ request.Filename is null throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -518,7 +518,7 @@ request.Filename is null { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -563,7 +563,7 @@ request.Filename is null throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -1028,13 +1028,13 @@ request.Filename is null if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -1045,7 +1045,7 @@ request.Filename is null throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -1065,13 +1065,13 @@ request.Filename is null if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -1082,7 +1082,7 @@ request.Filename is null throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -1121,7 +1121,7 @@ request.Filename is null { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -1162,7 +1162,7 @@ request.Filename is null throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -1571,13 +1571,13 @@ request.Filename is null if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -1588,7 +1588,7 @@ request.Filename is null throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -1608,13 +1608,13 @@ request.Filename is null if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -1625,7 +1625,7 @@ request.Filename is null throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -1668,7 +1668,7 @@ request.Filename is null { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -1713,7 +1713,7 @@ request.Filename is null throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs index 2a5539e..b125419 100644 --- a/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs @@ -337,13 +337,13 @@ partial void ProcessGetStyleByIdResponseContent( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -354,7 +354,7 @@ partial void ProcessGetStyleByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -374,13 +374,13 @@ partial void ProcessGetStyleByIdResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -391,7 +391,7 @@ partial void ProcessGetStyleByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -434,7 +434,7 @@ partial void ProcessGetStyleByIdResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -479,7 +479,7 @@ partial void ProcessGetStyleByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs index 1245a58..2b1e783 100644 --- a/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs @@ -328,13 +328,13 @@ partial void ProcessGetStylesResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -345,7 +345,7 @@ partial void ProcessGetStylesResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -388,7 +388,7 @@ partial void ProcessGetStylesResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -433,7 +433,7 @@ partial void ProcessGetStylesResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs b/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs index f767c04..17afc68 100644 --- a/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs @@ -349,13 +349,13 @@ partial void ProcessGetTaskByIdResponseContent( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -366,7 +366,7 @@ partial void ProcessGetTaskByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -386,13 +386,13 @@ partial void ProcessGetTaskByIdResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -403,7 +403,7 @@ partial void ProcessGetTaskByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -446,7 +446,7 @@ partial void ProcessGetTaskByIdResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -491,7 +491,7 @@ partial void ProcessGetTaskByIdResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs b/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs index e2c42d6..4d78079 100644 --- a/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs @@ -406,13 +406,13 @@ partial void ProcessListTasksResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -423,7 +423,7 @@ partial void ProcessListTasksResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -466,7 +466,7 @@ partial void ProcessListTasksResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -511,7 +511,7 @@ partial void ProcessListTasksResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs b/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs index 1ef80dc..1672822 100644 --- a/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs @@ -357,13 +357,13 @@ partial void ProcessRunTaskResponseContent( if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -374,7 +374,7 @@ partial void ProcessRunTaskResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -394,13 +394,13 @@ partial void ProcessRunTaskResponseContent( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -411,7 +411,7 @@ partial void ProcessRunTaskResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -431,13 +431,13 @@ partial void ProcessRunTaskResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -448,7 +448,7 @@ partial void ProcessRunTaskResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -491,7 +491,7 @@ partial void ProcessRunTaskResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -536,7 +536,7 @@ partial void ProcessRunTaskResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs b/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs index 898837f..4e79734 100644 --- a/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs @@ -328,13 +328,13 @@ partial void ProcessGetUsageResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -345,7 +345,7 @@ partial void ProcessGetUsageResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -388,7 +388,7 @@ partial void ProcessGetUsageResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -433,7 +433,7 @@ partial void ProcessGetUsageResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs index 9e3d065..d4b53d0 100644 --- a/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs @@ -350,13 +350,13 @@ partial void ProcessGetAllUsersResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -367,7 +367,7 @@ partial void ProcessGetAllUsersResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -410,7 +410,7 @@ partial void ProcessGetAllUsersResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -455,7 +455,7 @@ partial void ProcessGetAllUsersResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs index bf74037..22d5aea 100644 --- a/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs @@ -337,13 +337,13 @@ partial void ProcessGetUserResponseContent( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -354,7 +354,7 @@ partial void ProcessGetUserResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -374,13 +374,13 @@ partial void ProcessGetUserResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -391,7 +391,7 @@ partial void ProcessGetUserResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -434,7 +434,7 @@ partial void ProcessGetUserResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -479,7 +479,7 @@ partial void ProcessGetUserResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs index 53f4174..86eafcf 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs @@ -348,13 +348,13 @@ partial void ProcessCreateToneResponseContent( if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -365,7 +365,7 @@ partial void ProcessCreateToneResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -385,13 +385,13 @@ partial void ProcessCreateToneResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -402,7 +402,7 @@ partial void ProcessCreateToneResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -445,7 +445,7 @@ partial void ProcessCreateToneResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -490,7 +490,7 @@ partial void ProcessCreateToneResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs index 3c42d23..7efd49f 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs @@ -330,13 +330,13 @@ await DeleteToneAsResponseAsync( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -347,7 +347,7 @@ await DeleteToneAsResponseAsync( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -367,13 +367,13 @@ await DeleteToneAsResponseAsync( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -384,7 +384,7 @@ await DeleteToneAsResponseAsync( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -420,7 +420,7 @@ await DeleteToneAsResponseAsync( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -456,7 +456,7 @@ await DeleteToneAsResponseAsync( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs index cc94132..c61e011 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs @@ -328,13 +328,13 @@ partial void ProcessGetAllTonesResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -345,7 +345,7 @@ partial void ProcessGetAllTonesResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -388,7 +388,7 @@ partial void ProcessGetAllTonesResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -433,7 +433,7 @@ partial void ProcessGetAllTonesResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs index 3f8f280..20a8acd 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs @@ -337,13 +337,13 @@ partial void ProcessGetToneResponseContent( if (__effectiveReadResponseAsString) { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } else { __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_404 = global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); + __value_404 = __content_404 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_404, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -354,7 +354,7 @@ partial void ProcessGetToneResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, responseBody: __content_404, responseObject: __value_404, @@ -374,13 +374,13 @@ partial void ProcessGetToneResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -391,7 +391,7 @@ partial void ProcessGetToneResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -434,7 +434,7 @@ partial void ProcessGetToneResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -479,7 +479,7 @@ partial void ProcessGetToneResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( diff --git a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs index be67603..0f6cb5b 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs @@ -357,13 +357,13 @@ partial void ProcessUpdateToneResponseContent( if (__effectiveReadResponseAsString) { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } else { __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); + __value_400 = __content_400 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_400, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -374,7 +374,7 @@ partial void ProcessUpdateToneResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, responseBody: __content_400, responseObject: __value_400, @@ -394,13 +394,13 @@ partial void ProcessUpdateToneResponseContent( if (__effectiveReadResponseAsString) { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_500 = global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); + __value_500 = __content_500 is not { Length: > 0 } ? null : global::JasperAI.ErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) @@ -411,7 +411,7 @@ partial void ProcessUpdateToneResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, responseBody: __content_500, responseObject: __value_500, @@ -454,7 +454,7 @@ partial void ProcessUpdateToneResponseContent( { throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary( @@ -499,7 +499,7 @@ partial void ProcessUpdateToneResponseContent( throw global::JasperAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content ?? __response.ReasonPhrase ?? string.Empty, + message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty, innerException: __ex, responseBody: __content, responseHeaders: global::System.Linq.Enumerable.ToDictionary(