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 @@ -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<global::Descript.Error403>.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)
{
Expand Down
12 changes: 12 additions & 0 deletions src/libs/Descript/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down