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 @@ -390,18 +390,17 @@ partial void ProcessAgentEditJobResponseContent(
__exception_400 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error400>(

throw global::Descript.ApiException<global::Descript.Error400>.Create(
statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
statusCode: __response.StatusCode)
{
ResponseBody = __content_400,
ResponseObject = __value_400,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content_400,
responseObject: __value_400,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}
// Unauthorized - missing or invalid authentication token
if ((int)__response.StatusCode == 401)
Expand All @@ -428,18 +427,17 @@ partial void ProcessAgentEditJobResponseContent(
__exception_401 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error401>(

throw global::Descript.ApiException<global::Descript.Error401>.Create(
statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
statusCode: __response.StatusCode)
{
ResponseBody = __content_401,
ResponseObject = __value_401,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content_401,
responseObject: __value_401,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}
// Payment Required - insufficient AI credits to start the job
if ((int)__response.StatusCode == 402)
Expand All @@ -466,18 +464,17 @@ partial void ProcessAgentEditJobResponseContent(
__exception_402 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error402>(

throw global::Descript.ApiException<global::Descript.Error402>.Create(
statusCode: __response.StatusCode,
message: __content_402 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_402,
statusCode: __response.StatusCode)
{
ResponseBody = __content_402,
ResponseObject = __value_402,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content_402,
responseObject: __value_402,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
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 All @@ -504,18 +501,17 @@ partial void ProcessAgentEditJobResponseContent(
__exception_404 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error404>(

throw global::Descript.ApiException<global::Descript.Error404>.Create(
statusCode: __response.StatusCode,
message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_404,
statusCode: __response.StatusCode)
{
ResponseBody = __content_404,
ResponseObject = __value_404,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content_404,
responseObject: __value_404,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}
// Too many requests - rate limit exceeded. Use the `Retry-After` header to determine when to retry.
if ((int)__response.StatusCode == 429)
Expand All @@ -542,18 +538,17 @@ partial void ProcessAgentEditJobResponseContent(
__exception_429 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error429>(

throw global::Descript.ApiException<global::Descript.Error429>.Create(
statusCode: __response.StatusCode,
message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_429,
statusCode: __response.StatusCode)
{
ResponseBody = __content_429,
ResponseObject = __value_429,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content_429,
responseObject: __value_429,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}

if (__effectiveReadResponseAsString)
Expand Down Expand Up @@ -587,17 +582,15 @@ partial void ProcessAgentEditJobResponseContent(
}
catch (global::System.Exception __ex)
{
throw new global::Descript.ApiException(
throw global::Descript.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}
}
else
Expand Down Expand Up @@ -634,17 +627,15 @@ partial void ProcessAgentEditJobResponseContent(
{
}

throw new global::Descript.ApiException(
throw global::Descript.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,18 +344,17 @@ await CancelJobAsResponseAsync(
__exception_401 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error401>(

throw global::Descript.ApiException<global::Descript.Error401>.Create(
statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
statusCode: __response.StatusCode)
{
ResponseBody = __content_401,
ResponseObject = __value_401,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content_401,
responseObject: __value_401,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}
// Forbidden - user does not have access to this job
if ((int)__response.StatusCode == 403)
Expand All @@ -382,18 +381,17 @@ await CancelJobAsResponseAsync(
__exception_403 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error403>(

throw global::Descript.ApiException<global::Descript.Error403>.Create(
statusCode: __response.StatusCode,
message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_403,
statusCode: __response.StatusCode)
{
ResponseBody = __content_403,
ResponseObject = __value_403,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content_403,
responseObject: __value_403,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}
// Job not found
if ((int)__response.StatusCode == 404)
Expand All @@ -420,18 +418,17 @@ await CancelJobAsResponseAsync(
__exception_404 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error404>(

throw global::Descript.ApiException<global::Descript.Error404>.Create(
statusCode: __response.StatusCode,
message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_404,
statusCode: __response.StatusCode)
{
ResponseBody = __content_404,
ResponseObject = __value_404,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content_404,
responseObject: __value_404,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}
// Too many requests - rate limit exceeded. Use the `Retry-After` header to determine when to retry.
if ((int)__response.StatusCode == 429)
Expand All @@ -458,18 +455,17 @@ await CancelJobAsResponseAsync(
__exception_429 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error429>(

throw global::Descript.ApiException<global::Descript.Error429>.Create(
statusCode: __response.StatusCode,
message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_429,
statusCode: __response.StatusCode)
{
ResponseBody = __content_429,
ResponseObject = __value_429,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content_429,
responseObject: __value_429,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}

if (__effectiveReadResponseAsString)
Expand All @@ -496,17 +492,15 @@ await CancelJobAsResponseAsync(
}
catch (global::System.Exception __ex)
{
throw new global::Descript.ApiException(
throw global::Descript.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}
}
else
Expand Down Expand Up @@ -534,17 +528,15 @@ await CancelJobAsResponseAsync(
{
}

throw new global::Descript.ApiException(
throw global::Descript.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}
}

Expand Down
Loading