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
37 changes: 37 additions & 0 deletions src/libs/Shotstack/Generated/Shotstack.EditClient.GetGenerate.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,43 @@ partial void ProcessGetGenerateResponseContent(
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// No generation job with this id exists for the calling account.
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
global::System.Exception? __exception_404 = null;
global::Shotstack.GenerationErrorResponse? __value_404 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_404 = 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);
}
}
catch (global::System.Exception __ex)
{
__exception_404 = __ex;
}


throw global::Shotstack.ApiException<global::Shotstack.GenerationErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_404,
responseBody: __content_404,
responseObject: __value_404,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}

if (__effectiveReadResponseAsString)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,20 +315,24 @@ partial void ProcessGetModelResponseContent(
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
//
// No listed model has that identifier. `error.name` tells an unknown model from one that has been withdrawn.
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
global::System.Exception? __exception_404 = null;
global::Shotstack.GenerationModelErrorResponse? __value_404 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_404 = 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);
}
}
catch (global::System.Exception __ex)
Expand All @@ -337,11 +341,12 @@ partial void ProcessGetModelResponseContent(
}


throw global::Shotstack.ApiException.Create(
throw global::Shotstack.ApiException<global::Shotstack.GenerationModelErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_404,
responseBody: __content_404,
responseObject: __value_404,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Loading
Loading