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 @@ -537,6 +537,80 @@ partial void ProcessActorRunDatasetItemsPostResponseContent(
h => h.Key,
h => h.Value));
}
// Payload too large - the request body exceeds the size limit.
if ((int)__response.StatusCode == 413)
{
string? __content_413 = null;
global::System.Exception? __exception_413 = null;
global::Apify.ErrorResponse? __value_413 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_413 = global::Apify.ErrorResponse.FromJson(__content_413, JsonSerializerContext);
}
else
{
__content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_413 = global::Apify.ErrorResponse.FromJson(__content_413, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_413 = __ex;
}


throw global::Apify.ApiException<global::Apify.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_413 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_413,
responseBody: __content_413,
responseObject: __value_413,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
// Unsupported media type - the Content-Encoding of the request is not supported.
if ((int)__response.StatusCode == 415)
{
string? __content_415 = null;
global::System.Exception? __exception_415 = null;
global::Apify.ErrorResponse? __value_415 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_415 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_415 = global::Apify.ErrorResponse.FromJson(__content_415, JsonSerializerContext);
}
else
{
__content_415 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_415 = global::Apify.ErrorResponse.FromJson(__content_415, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_415 = __ex;
}


throw global::Apify.ApiException<global::Apify.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_415 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_415,
responseBody: __content_415,
responseObject: __value_415,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
// Too many requests - rate limit exceeded.
if ((int)__response.StatusCode == 429)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,80 @@ partial void ProcessActRunsLastDatasetItemsPostResponseContent(
h => h.Key,
h => h.Value));
}
// Payload too large - the request body exceeds the size limit.
if ((int)__response.StatusCode == 413)
{
string? __content_413 = null;
global::System.Exception? __exception_413 = null;
global::Apify.ErrorResponse? __value_413 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_413 = global::Apify.ErrorResponse.FromJson(__content_413, JsonSerializerContext);
}
else
{
__content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_413 = global::Apify.ErrorResponse.FromJson(__content_413, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_413 = __ex;
}


throw global::Apify.ApiException<global::Apify.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_413 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_413,
responseBody: __content_413,
responseObject: __value_413,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
// Unsupported media type - the Content-Encoding of the request is not supported.
if ((int)__response.StatusCode == 415)
{
string? __content_415 = null;
global::System.Exception? __exception_415 = null;
global::Apify.ErrorResponse? __value_415 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_415 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_415 = global::Apify.ErrorResponse.FromJson(__content_415, JsonSerializerContext);
}
else
{
__content_415 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_415 = global::Apify.ErrorResponse.FromJson(__content_415, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_415 = __ex;
}


throw global::Apify.ApiException<global::Apify.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_415 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_415,
responseBody: __content_415,
responseObject: __value_415,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
// Too many requests - rate limit exceeded.
if ((int)__response.StatusCode == 429)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,80 @@ partial void ProcessActorTaskRunsLastDatasetItemsPostResponseContent(
h => h.Key,
h => h.Value));
}
// Payload too large - the request body exceeds the size limit.
if ((int)__response.StatusCode == 413)
{
string? __content_413 = null;
global::System.Exception? __exception_413 = null;
global::Apify.ErrorResponse? __value_413 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_413 = global::Apify.ErrorResponse.FromJson(__content_413, JsonSerializerContext);
}
else
{
__content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_413 = global::Apify.ErrorResponse.FromJson(__content_413, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_413 = __ex;
}


throw global::Apify.ApiException<global::Apify.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_413 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_413,
responseBody: __content_413,
responseObject: __value_413,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
// Unsupported media type - the Content-Encoding of the request is not supported.
if ((int)__response.StatusCode == 415)
{
string? __content_415 = null;
global::System.Exception? __exception_415 = null;
global::Apify.ErrorResponse? __value_415 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_415 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_415 = global::Apify.ErrorResponse.FromJson(__content_415, JsonSerializerContext);
}
else
{
__content_415 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_415 = global::Apify.ErrorResponse.FromJson(__content_415, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_415 = __ex;
}


throw global::Apify.ApiException<global::Apify.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_415 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_415,
responseBody: __content_415,
responseObject: __value_415,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
// Too many requests - rate limit exceeded.
if ((int)__response.StatusCode == 429)
{
Expand Down
6 changes: 6 additions & 0 deletions src/libs/Apify/Generated/Apify.Models.ErrorType.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ public enum ErrorType
/// <summary>
///
/// </summary>
FullPermissionActorBlockedForAdmin,
/// <summary>
///
/// </summary>
FullPermissionActorNotApproved,
/// <summary>
///
Expand Down Expand Up @@ -1714,6 +1718,7 @@ public static string ToValueString(this ErrorType value)
ErrorType.ExpiredConferenceToken => "expired-conference-token",
ErrorType.FailedToChargeUser => "failed-to-charge-user",
ErrorType.FinalInvoiceNegative => "final-invoice-negative",
ErrorType.FullPermissionActorBlockedForAdmin => "full-permission-actor-blocked-for-admin",
ErrorType.FullPermissionActorNotApproved => "full-permission-actor-not-approved",
ErrorType.GithubBranchEmpty => "github-branch-empty",
ErrorType.GithubIssueAlreadyExists => "github-issue-already-exists",
Expand Down Expand Up @@ -2116,6 +2121,7 @@ public static string ToValueString(this ErrorType value)
"expired-conference-token" => ErrorType.ExpiredConferenceToken,
"failed-to-charge-user" => ErrorType.FailedToChargeUser,
"final-invoice-negative" => ErrorType.FinalInvoiceNegative,
"full-permission-actor-blocked-for-admin" => ErrorType.FullPermissionActorBlockedForAdmin,
"full-permission-actor-not-approved" => ErrorType.FullPermissionActorNotApproved,
"github-branch-empty" => ErrorType.GithubBranchEmpty,
"github-issue-already-exists" => ErrorType.GithubIssueAlreadyExists,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,19 @@ public sealed partial class WebhookDispatchEventData
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("actorRunId")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string ActorRunId { get; set; }
public string? ActorRunId { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("actorBuildId")]
public string? ActorBuildId { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("actorTaskId")]
public string? ActorTaskId { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand All @@ -33,15 +44,21 @@ public sealed partial class WebhookDispatchEventData
/// </summary>
/// <param name="actorId"></param>
/// <param name="actorRunId"></param>
/// <param name="actorBuildId"></param>
/// <param name="actorTaskId"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public WebhookDispatchEventData(
string actorId,
string actorRunId)
string? actorRunId,
string? actorBuildId,
string? actorTaskId)
{
this.ActorId = actorId ?? throw new global::System.ArgumentNullException(nameof(actorId));
this.ActorRunId = actorRunId ?? throw new global::System.ArgumentNullException(nameof(actorRunId));
this.ActorRunId = actorRunId;
this.ActorBuildId = actorBuildId;
this.ActorTaskId = actorTaskId;
}

/// <summary>
Expand Down
Loading