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 @@ -333,7 +333,7 @@ await DeleteTemplateAsResponseAsync(
{
throw global::Shotstack.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 @@ -369,7 +369,7 @@ await DeleteTemplateAsResponseAsync(

throw global::Shotstack.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 @@ -326,13 +326,13 @@ partial void ProcessGetGenerateResponseContent(
if (__effectiveReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_404 = global::Shotstack.GenerationErrorResponse.FromJson(__content_404, JsonSerializerContext);
__value_404 = __content_404 is not { Length: > 0 } ? null : global::Shotstack.GenerationErrorResponse.FromJson(__content_404, JsonSerializerContext);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_404 = global::Shotstack.GenerationErrorResponse.FromJson(__content_404, JsonSerializerContext);
__value_404 = __content_404 is not { Length: > 0 } ? null : global::Shotstack.GenerationErrorResponse.FromJson(__content_404, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -343,7 +343,7 @@ partial void ProcessGetGenerateResponseContent(

throw global::Shotstack.ApiException<global::Shotstack.GenerationErrorResponse>.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 Down Expand Up @@ -386,7 +386,7 @@ partial void ProcessGetGenerateResponseContent(
{
throw global::Shotstack.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 @@ -431,7 +431,7 @@ partial void ProcessGetGenerateResponseContent(

throw global::Shotstack.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
10 changes: 5 additions & 5 deletions src/libs/Shotstack/Generated/Shotstack.EditClient.GetModel.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,13 @@ partial void ProcessGetModelResponseContent(
if (__effectiveReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_404 = global::Shotstack.GenerationModelErrorResponse.FromJson(__content_404, JsonSerializerContext);
__value_404 = __content_404 is not { Length: > 0 } ? null : global::Shotstack.GenerationModelErrorResponse.FromJson(__content_404, JsonSerializerContext);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_404 = global::Shotstack.GenerationModelErrorResponse.FromJson(__content_404, JsonSerializerContext);
__value_404 = __content_404 is not { Length: > 0 } ? null : global::Shotstack.GenerationModelErrorResponse.FromJson(__content_404, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -343,7 +343,7 @@ partial void ProcessGetModelResponseContent(

throw global::Shotstack.ApiException<global::Shotstack.GenerationModelErrorResponse>.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 Down Expand Up @@ -386,7 +386,7 @@ partial void ProcessGetModelResponseContent(
{
throw global::Shotstack.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 @@ -431,7 +431,7 @@ partial void ProcessGetModelResponseContent(

throw global::Shotstack.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 @@ -354,7 +354,7 @@ partial void ProcessGetModelsResponseContent(
{
throw global::Shotstack.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 @@ -399,7 +399,7 @@ partial void ProcessGetModelsResponseContent(

throw global::Shotstack.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 @@ -347,7 +347,7 @@ partial void ProcessGetRenderResponseContent(
{
throw global::Shotstack.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 @@ -392,7 +392,7 @@ partial void ProcessGetRenderResponseContent(

throw global::Shotstack.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 @@ -347,7 +347,7 @@ partial void ProcessGetTemplateResponseContent(
{
throw global::Shotstack.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 @@ -392,7 +392,7 @@ partial void ProcessGetTemplateResponseContent(

throw global::Shotstack.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 @@ -338,7 +338,7 @@ partial void ProcessGetTemplatesResponseContent(
{
throw global::Shotstack.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 @@ -383,7 +383,7 @@ partial void ProcessGetTemplatesResponseContent(

throw global::Shotstack.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