Skip to content
Open
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 @@ -370,18 +370,17 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
__exception_400 = __ex;
}

throw new global::EdenAI.ApiException<global::EdenAI.BadRequest>(

throw global::EdenAI.ApiException<global::EdenAI.BadRequest>.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));
}
//
if ((int)__response.StatusCode == 500)
Expand All @@ -408,18 +407,17 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
__exception_500 = __ex;
}

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

throw global::EdenAI.ApiException<global::EdenAI.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 ((int)__response.StatusCode == 403)
Expand All @@ -446,18 +444,17 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
__exception_403 = __ex;
}

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

throw global::EdenAI.ApiException<global::EdenAI.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));
}
//
if ((int)__response.StatusCode == 404)
Expand All @@ -484,18 +481,17 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
__exception_404 = __ex;
}

throw new global::EdenAI.ApiException<global::EdenAI.NotFoundResponse>(

throw global::EdenAI.ApiException<global::EdenAI.NotFoundResponse>.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));
}

if (__effectiveReadResponseAsString)
Expand Down Expand Up @@ -529,17 +525,15 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
}
catch (global::System.Exception __ex)
{
throw new global::EdenAI.ApiException(
throw global::EdenAI.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 @@ -576,17 +570,15 @@ partial void ProcessImageImageAiDetectionCreateResponseContent(
{
}

throw new global::EdenAI.ApiException(
throw global::EdenAI.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 @@ -402,18 +402,17 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
__exception_400 = __ex;
}

throw new global::EdenAI.ApiException<global::EdenAI.BadRequest>(

throw global::EdenAI.ApiException<global::EdenAI.BadRequest>.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));
}
//
if ((int)__response.StatusCode == 500)
Expand All @@ -440,18 +439,17 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
__exception_500 = __ex;
}

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

throw global::EdenAI.ApiException<global::EdenAI.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 ((int)__response.StatusCode == 403)
Expand All @@ -478,18 +476,17 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
__exception_403 = __ex;
}

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

throw global::EdenAI.ApiException<global::EdenAI.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));
}
//
if ((int)__response.StatusCode == 404)
Expand All @@ -516,18 +513,17 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
__exception_404 = __ex;
}

throw new global::EdenAI.ApiException<global::EdenAI.NotFoundResponse>(

throw global::EdenAI.ApiException<global::EdenAI.NotFoundResponse>.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));
}

if (__effectiveReadResponseAsString)
Expand Down Expand Up @@ -561,17 +557,15 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
}
catch (global::System.Exception __ex)
{
throw new global::EdenAI.ApiException(
throw global::EdenAI.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 @@ -608,17 +602,15 @@ partial void ProcessTextTextAiDetectionCreateResponseContent(
{
}

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