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
20 changes: 10 additions & 10 deletions src/libs/HeyGen/Generated/HeyGen.AssetsClient.V1AssetUpload.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ partial void ProcessV1AssetUploadResponse(
try
{
__response.EnsureSuccessStatusCode();

}
catch (global::System.Net.Http.HttpRequestException __ex)
catch (global::System.Exception __ex)
{
throw new global::HeyGen.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
Expand All @@ -106,15 +107,21 @@ partial void ProcessV1AssetUploadResponse(
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::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
Expand All @@ -127,13 +134,6 @@ partial void ProcessV1AssetUploadResponse(
h => h.Value),
};
}

using var __content = await __response.Content.ReadAsStreamAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ partial void ProcessV1VideoDeleteResponse(
try
{
__response.EnsureSuccessStatusCode();

}
catch (global::System.Net.Http.HttpRequestException __ex)
catch (global::System.Exception __ex)
{
throw new global::HeyGen.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
Expand All @@ -117,15 +118,21 @@ partial void ProcessV1VideoDeleteResponse(
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::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
Expand All @@ -138,13 +145,6 @@ partial void ProcessV1VideoDeleteResponse(
h => h.Value),
};
}

using var __content = await __response.Content.ReadAsStreamAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ partial void ProcessV2VideoGenerateResponse(
try
{
__response.EnsureSuccessStatusCode();

}
catch (global::System.Net.Http.HttpRequestException __ex)
catch (global::System.Exception __ex)
{
throw new global::HeyGen.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
Expand All @@ -121,15 +122,21 @@ partial void ProcessV2VideoGenerateResponse(
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::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
Expand All @@ -142,13 +149,6 @@ partial void ProcessV2VideoGenerateResponse(
h => h.Value),
};
}

using var __content = await __response.Content.ReadAsStreamAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

}
}

Expand Down
4 changes: 2 additions & 2 deletions src/libs/HeyGen/Generated/HeyGen.Exceptions.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public ApiException(string message, global::System.Net.HttpStatusCode statusCode
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
/// <param name="statusCode">The HTTP status code of the response.</param>
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;
}
Expand Down Expand Up @@ -83,7 +83,7 @@ public ApiException(string message, global::System.Net.HttpStatusCode statusCode
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
/// <param name="statusCode">The HTTP status code of the response.</param>
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)
{
}
}
Expand Down
20 changes: 10 additions & 10 deletions src/libs/HeyGen/Generated/HeyGen.HeyGenApi.V1VideoStatusGet.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ partial void ProcessV1VideoStatusGetResponse(
try
{
__response.EnsureSuccessStatusCode();

}
catch (global::System.Net.Http.HttpRequestException __ex)
catch (global::System.Exception __ex)
{
throw new global::HeyGen.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
Expand All @@ -117,15 +118,21 @@ partial void ProcessV1VideoStatusGetResponse(
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::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
Expand All @@ -138,13 +145,6 @@ partial void ProcessV1VideoStatusGetResponse(
h => h.Value),
};
}

using var __content = await __response.Content.ReadAsStreamAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

}
}
}
Expand Down
20 changes: 10 additions & 10 deletions src/libs/HeyGen/Generated/HeyGen.ListsClient.V1AvatarList.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ partial void ProcessV1AvatarListResponse(
try
{
__response.EnsureSuccessStatusCode();

}
catch (global::System.Net.Http.HttpRequestException __ex)
catch (global::System.Exception __ex)
{
throw new global::HeyGen.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
Expand All @@ -106,15 +107,21 @@ partial void ProcessV1AvatarListResponse(
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::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
Expand All @@ -127,13 +134,6 @@ partial void ProcessV1AvatarListResponse(
h => h.Value),
};
}

using var __content = await __response.Content.ReadAsStreamAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

}
}
}
Expand Down
20 changes: 10 additions & 10 deletions src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VideoList.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ partial void ProcessV1VideoListResponse(
try
{
__response.EnsureSuccessStatusCode();

}
catch (global::System.Net.Http.HttpRequestException __ex)
catch (global::System.Exception __ex)
{
throw new global::HeyGen.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
Expand All @@ -106,15 +107,21 @@ partial void ProcessV1VideoListResponse(
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::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
Expand All @@ -127,13 +134,6 @@ partial void ProcessV1VideoListResponse(
h => h.Value),
};
}

using var __content = await __response.Content.ReadAsStreamAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

}
}
}
Expand Down
20 changes: 10 additions & 10 deletions src/libs/HeyGen/Generated/HeyGen.ListsClient.V1VoiceList.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ partial void ProcessV1VoiceListResponse(
try
{
__response.EnsureSuccessStatusCode();

}
catch (global::System.Net.Http.HttpRequestException __ex)
catch (global::System.Exception __ex)
{
throw new global::HeyGen.ApiException(
message: __content ?? __response.ReasonPhrase ?? string.Empty,
Expand All @@ -106,15 +107,21 @@ partial void ProcessV1VoiceListResponse(
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::HeyGen.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
Expand All @@ -127,13 +134,6 @@ partial void ProcessV1VoiceListResponse(
h => h.Value),
};
}

using var __content = await __response.Content.ReadAsStreamAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

}
}
}
Expand Down
Loading
Loading