Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -354,7 +354,7 @@ partial void ProcessGetAudienceByIdResponseContent(

throw global::JasperAI.ApiException<global::JasperAI.ErrorResponse>.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,
Expand All @@ -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)
Expand All @@ -391,7 +391,7 @@ partial void ProcessGetAudienceByIdResponseContent(

throw global::JasperAI.ApiException<global::JasperAI.ErrorResponse>.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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -345,7 +345,7 @@ partial void ProcessGetAudiencesResponseContent(

throw global::JasperAI.ApiException<global::JasperAI.ErrorResponse>.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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
16 changes: 8 additions & 8 deletions src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -365,7 +365,7 @@ partial void ProcessCommandResponseContent(

throw global::JasperAI.ApiException<global::JasperAI.ErrorResponse>.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,
Expand All @@ -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)
Expand All @@ -402,7 +402,7 @@ partial void ProcessCommandResponseContent(

throw global::JasperAI.ApiException<global::JasperAI.ErrorResponse>.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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -365,7 +365,7 @@ partial void ProcessCreateDocumentResponseContent(

throw global::JasperAI.ApiException<global::JasperAI.ErrorResponse>.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,
Expand All @@ -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)
Expand All @@ -402,7 +402,7 @@ partial void ProcessCreateDocumentResponseContent(

throw global::JasperAI.ApiException<global::JasperAI.ErrorResponse>.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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Loading
Loading