diff --git a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.AgentEditJob.g.cs b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.AgentEditJob.g.cs index ea084d1..86d7cc0 100644 --- a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.AgentEditJob.g.cs +++ b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.AgentEditJob.g.cs @@ -476,6 +476,43 @@ partial void ProcessAgentEditJobResponseContent( h => h.Key, h => h.Value)); } + // Forbidden - the drive admin has disabled agent usage for this drive + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Descript.Error403? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Descript.Error403.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Descript.Error403.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } // Not found: - Project doesn't exist - Composition doesn't exist in the specified project (when composition_id is provided) if ((int)__response.StatusCode == 404) { diff --git a/src/libs/Descript/openapi.yaml b/src/libs/Descript/openapi.yaml index d488354..8315378 100644 --- a/src/libs/Descript/openapi.yaml +++ b/src/libs/Descript/openapi.yaml @@ -901,6 +901,18 @@ paths: value: error: payment_required message: Insufficient AI credits to start the job (100 credits required, 25 available) + '403': + description: Forbidden - the drive admin has disabled agent usage for this drive + content: + application/json: + schema: + $ref: '#/components/schemas/Error403' + examples: + agent_disabled: + summary: Agent usage disabled by admin + value: + error: forbidden + message: Agent usage has been disabled by your admin '404': description: | Not found: