diff --git a/src/libs/Runway/Generated/Runway.Exceptions.g.cs b/src/libs/Runway/Generated/Runway.Exceptions.g.cs
index 603adb7..efe236c 100644
--- a/src/libs/Runway/Generated/Runway.Exceptions.g.cs
+++ b/src/libs/Runway/Generated/Runway.Exceptions.g.cs
@@ -43,7 +43,7 @@ public ApiException(string message, global::System.Net.HttpStatusCode statusCode
/// The error message that explains the reason for the exception.
/// The exception that is the cause of the current exception, or a null reference if no inner exception is specified.
/// The HTTP status code of the response.
- public ApiException(string message, global::System.Exception innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException)
+ public ApiException(string message, global::System.Exception? innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException)
{
StatusCode = statusCode;
}
@@ -83,7 +83,7 @@ public ApiException(string message, global::System.Net.HttpStatusCode statusCode
/// The error message that explains the reason for the exception.
/// The exception that is the cause of the current exception, or a null reference if no inner exception is specified.
/// The HTTP status code of the response.
- public ApiException(string message, global::System.Exception innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode)
+ public ApiException(string message, global::System.Exception? innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode)
{
}
}
diff --git a/src/libs/Runway/Generated/Runway.RunwayClient.CancelOrDeleteTask.g.cs b/src/libs/Runway/Generated/Runway.RunwayClient.CancelOrDeleteTask.g.cs
index 341ae95..cc9b0a3 100644
--- a/src/libs/Runway/Generated/Runway.RunwayClient.CancelOrDeleteTask.g.cs
+++ b/src/libs/Runway/Generated/Runway.RunwayClient.CancelOrDeleteTask.g.cs
@@ -93,17 +93,26 @@ partial void ProcessCancelOrDeleteTaskResponse(
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
- if (ReadResponseAsString)
+ global::System.Exception? __exception_404 = null;
+ try
{
- __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ if (ReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
}
- else
+ catch (global::System.Exception __ex)
{
- var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ __exception_404 = __ex;
}
throw new global::Runway.ApiException(
message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
statusCode: __response.StatusCode)
{
ResponseBody = __content_404,
@@ -130,8 +139,9 @@ partial void ProcessCancelOrDeleteTaskResponse(
try
{
__response.EnsureSuccessStatusCode();
+
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ catch (global::System.Exception __ex)
{
throw new global::Runway.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
@@ -145,15 +155,21 @@ partial void ProcessCancelOrDeleteTaskResponse(
h => h.Value),
};
}
-
}
else
{
try
{
__response.EnsureSuccessStatusCode();
+
+ using var __content = await __response.Content.ReadAsStreamAsync(
+#if NET5_0_OR_GREATER
+ cancellationToken
+#endif
+ ).ConfigureAwait(false);
+
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ catch (global::System.Exception __ex)
{
throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
@@ -166,13 +182,6 @@ partial void ProcessCancelOrDeleteTaskResponse(
h => h.Value),
};
}
-
- using var __content = await __response.Content.ReadAsStreamAsync(
-#if NET5_0_OR_GREATER
- cancellationToken
-#endif
- ).ConfigureAwait(false);
-
}
}
}
diff --git a/src/libs/Runway/Generated/Runway.RunwayClient.CreateVideoFromImage.g.cs b/src/libs/Runway/Generated/Runway.RunwayClient.CreateVideoFromImage.g.cs
index b783f00..1d3f18d 100644
--- a/src/libs/Runway/Generated/Runway.RunwayClient.CreateVideoFromImage.g.cs
+++ b/src/libs/Runway/Generated/Runway.RunwayClient.CreateVideoFromImage.g.cs
@@ -106,17 +106,26 @@ partial void ProcessCreateVideoFromImageResponseContent(
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
- if (ReadResponseAsString)
+ global::System.Exception? __exception_429 = null;
+ try
{
- __content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ if (ReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
}
- else
+ catch (global::System.Exception __ex)
{
- var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ __exception_429 = __ex;
}
throw new global::Runway.ApiException(
message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
statusCode: __response.StatusCode)
{
ResponseBody = __content_429,
@@ -147,8 +156,12 @@ partial void ProcessCreateVideoFromImageResponseContent(
try
{
__response.EnsureSuccessStatusCode();
+
+ return
+ global::Runway.CreateVideoFromImageResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ catch (global::System.Exception __ex)
{
throw new global::Runway.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
@@ -162,18 +175,24 @@ partial void ProcessCreateVideoFromImageResponseContent(
h => h.Value),
};
}
-
- return
- global::Runway.CreateVideoFromImageResponse.FromJson(__content, JsonSerializerContext) ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
else
{
try
{
__response.EnsureSuccessStatusCode();
+
+ using var __content = await __response.Content.ReadAsStreamAsync(
+#if NET5_0_OR_GREATER
+ cancellationToken
+#endif
+ ).ConfigureAwait(false);
+
+ return
+ await global::Runway.CreateVideoFromImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ catch (global::System.Exception __ex)
{
throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
@@ -186,16 +205,6 @@ partial void ProcessCreateVideoFromImageResponseContent(
h => h.Value),
};
}
-
- using var __content = await __response.Content.ReadAsStreamAsync(
-#if NET5_0_OR_GREATER
- cancellationToken
-#endif
- ).ConfigureAwait(false);
-
- return
- await global::Runway.CreateVideoFromImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
- throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
diff --git a/src/libs/Runway/Generated/Runway.RunwayClient.GetTaskDetail.g.cs b/src/libs/Runway/Generated/Runway.RunwayClient.GetTaskDetail.g.cs
index 8e1337b..4e57274 100644
--- a/src/libs/Runway/Generated/Runway.RunwayClient.GetTaskDetail.g.cs
+++ b/src/libs/Runway/Generated/Runway.RunwayClient.GetTaskDetail.g.cs
@@ -98,17 +98,26 @@ partial void ProcessGetTaskDetailResponseContent(
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
- if (ReadResponseAsString)
+ global::System.Exception? __exception_404 = null;
+ try
{
- __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ if (ReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
}
- else
+ catch (global::System.Exception __ex)
{
- var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ __exception_404 = __ex;
}
throw new global::Runway.ApiException(
message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
statusCode: __response.StatusCode)
{
ResponseBody = __content_404,
@@ -139,8 +148,12 @@ partial void ProcessGetTaskDetailResponseContent(
try
{
__response.EnsureSuccessStatusCode();
+
+ return
+ global::Runway.GetTaskDetailResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ catch (global::System.Exception __ex)
{
throw new global::Runway.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
@@ -154,18 +167,24 @@ partial void ProcessGetTaskDetailResponseContent(
h => h.Value),
};
}
-
- return
- global::Runway.GetTaskDetailResponse.FromJson(__content, JsonSerializerContext) ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
else
{
try
{
__response.EnsureSuccessStatusCode();
+
+ using var __content = await __response.Content.ReadAsStreamAsync(
+#if NET5_0_OR_GREATER
+ cancellationToken
+#endif
+ ).ConfigureAwait(false);
+
+ return
+ await global::Runway.GetTaskDetailResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ catch (global::System.Exception __ex)
{
throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
@@ -178,16 +197,6 @@ partial void ProcessGetTaskDetailResponseContent(
h => h.Value),
};
}
-
- using var __content = await __response.Content.ReadAsStreamAsync(
-#if NET5_0_OR_GREATER
- cancellationToken
-#endif
- ).ConfigureAwait(false);
-
- return
- await global::Runway.GetTaskDetailResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
- throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
}