@@ -563,6 +563,80 @@ partial void ProcessActorTaskRunsLastDatasetItemsPostResponseContent(
563563 h => h . Key ,
564564 h => h . Value ) ) ;
565565 }
566+ // Payload too large - the request body exceeds the size limit.
567+ if ( ( int ) __response . StatusCode == 413 )
568+ {
569+ string ? __content_413 = null ;
570+ global ::System . Exception ? __exception_413 = null ;
571+ global ::Apify . ErrorResponse ? __value_413 = null ;
572+ try
573+ {
574+ if ( __effectiveReadResponseAsString )
575+ {
576+ __content_413 = await __response . Content . ReadAsStringAsync ( __effectiveCancellationToken ) . ConfigureAwait ( false ) ;
577+ __value_413 = global ::Apify . ErrorResponse . FromJson ( __content_413 , JsonSerializerContext ) ;
578+ }
579+ else
580+ {
581+ __content_413 = await __response . Content . ReadAsStringAsync ( __effectiveCancellationToken ) . ConfigureAwait ( false ) ;
582+
583+ __value_413 = global ::Apify . ErrorResponse . FromJson ( __content_413 , JsonSerializerContext ) ;
584+ }
585+ }
586+ catch ( global ::System . Exception __ex )
587+ {
588+ __exception_413 = __ex ;
589+ }
590+
591+
592+ throw global ::Apify . ApiException < global ::Apify . ErrorResponse > . Create (
593+ statusCode : __response . StatusCode ,
594+ message : __content_413 ?? __response . ReasonPhrase ?? string . Empty ,
595+ innerException : __exception_413 ,
596+ responseBody : __content_413 ,
597+ responseObject : __value_413 ,
598+ responseHeaders : global ::System . Linq . Enumerable . ToDictionary (
599+ __response . Headers ,
600+ h => h . Key ,
601+ h => h . Value ) ) ;
602+ }
603+ // Unsupported media type - the Content-Encoding of the request is not supported.
604+ if ( ( int ) __response . StatusCode == 415 )
605+ {
606+ string ? __content_415 = null ;
607+ global ::System . Exception ? __exception_415 = null ;
608+ global ::Apify . ErrorResponse ? __value_415 = null ;
609+ try
610+ {
611+ if ( __effectiveReadResponseAsString )
612+ {
613+ __content_415 = await __response . Content . ReadAsStringAsync ( __effectiveCancellationToken ) . ConfigureAwait ( false ) ;
614+ __value_415 = global ::Apify . ErrorResponse . FromJson ( __content_415 , JsonSerializerContext ) ;
615+ }
616+ else
617+ {
618+ __content_415 = await __response . Content . ReadAsStringAsync ( __effectiveCancellationToken ) . ConfigureAwait ( false ) ;
619+
620+ __value_415 = global ::Apify . ErrorResponse . FromJson ( __content_415 , JsonSerializerContext ) ;
621+ }
622+ }
623+ catch ( global ::System . Exception __ex )
624+ {
625+ __exception_415 = __ex ;
626+ }
627+
628+
629+ throw global ::Apify . ApiException < global ::Apify . ErrorResponse > . Create (
630+ statusCode : __response . StatusCode ,
631+ message : __content_415 ?? __response . ReasonPhrase ?? string . Empty ,
632+ innerException : __exception_415 ,
633+ responseBody : __content_415 ,
634+ responseObject : __value_415 ,
635+ responseHeaders : global ::System . Linq . Enumerable . ToDictionary (
636+ __response . Headers ,
637+ h => h . Key ,
638+ h => h . Value ) ) ;
639+ }
566640 // Too many requests - rate limit exceeded.
567641 if ( ( int ) __response . StatusCode == 429 )
568642 {
0 commit comments