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 @@ -355,18 +355,17 @@ partial void ProcessArchiveAgentResponseContent(
__exception_401 = __ex;
}

throw new global::CursorAgents.ApiException<global::CursorAgents.Error>(

throw global::CursorAgents.ApiException<global::CursorAgents.Error>.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));
}
// Authenticated but insufficient permissions, plan required, or feature unavailable.
if ((int)__response.StatusCode == 403)
Expand All @@ -393,18 +392,17 @@ partial void ProcessArchiveAgentResponseContent(
__exception_403 = __ex;
}

throw new global::CursorAgents.ApiException<global::CursorAgents.Error>(

throw global::CursorAgents.ApiException<global::CursorAgents.Error>.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));
}
// Agent or run not found.
if ((int)__response.StatusCode == 404)
Expand All @@ -431,18 +429,17 @@ partial void ProcessArchiveAgentResponseContent(
__exception_404 = __ex;
}

throw new global::CursorAgents.ApiException<global::CursorAgents.Error>(

throw global::CursorAgents.ApiException<global::CursorAgents.Error>.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));
}
// Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
Expand All @@ -469,18 +466,17 @@ partial void ProcessArchiveAgentResponseContent(
__exception_429 = __ex;
}

throw new global::CursorAgents.ApiException<global::CursorAgents.Error>(

throw global::CursorAgents.ApiException<global::CursorAgents.Error>.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));
}
// Internal server error.
if ((int)__response.StatusCode == 500)
Expand All @@ -507,18 +503,17 @@ partial void ProcessArchiveAgentResponseContent(
__exception_500 = __ex;
}

throw new global::CursorAgents.ApiException<global::CursorAgents.Error>(

throw global::CursorAgents.ApiException<global::CursorAgents.Error>.Create(
statusCode: __response.StatusCode,
message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_500,
statusCode: __response.StatusCode)
{
ResponseBody = __content_500,
ResponseObject = __value_500,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
responseBody: __content_500,
responseObject: __value_500,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
h => h.Value));
}

if (__effectiveReadResponseAsString)
Expand Down Expand Up @@ -552,17 +547,15 @@ partial void ProcessArchiveAgentResponseContent(
}
catch (global::System.Exception __ex)
{
throw new global::CursorAgents.ApiException(
throw global::CursorAgents.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 @@ -599,17 +592,15 @@ partial void ProcessArchiveAgentResponseContent(
{
}

throw new global::CursorAgents.ApiException(
throw global::CursorAgents.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
Loading