ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1

This commit is contained in:
speakeasybot
2024-11-12 00:02:22 +00:00
parent 1405e03aa3
commit dd750e0d1a
42 changed files with 833 additions and 567 deletions

View File

@@ -112,15 +112,17 @@ class Search(BaseSDK):
data.raw_response = http_res
raise errors.PerformSearchUnauthorized(data=data)
if utils.match_response(http_res, ["4XX", "5XX"], "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res.text, http_res
"API error occurred", http_res.status_code, http_res_text, http_res
)
content_type = http_res.headers.get("Content-Type")
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
http_res.status_code,
http_res.text,
http_res_text,
http_res,
)
@@ -225,15 +227,17 @@ class Search(BaseSDK):
data.raw_response = http_res
raise errors.PerformSearchUnauthorized(data=data)
if utils.match_response(http_res, ["4XX", "5XX"], "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res.text, http_res
"API error occurred", http_res.status_code, http_res_text, http_res
)
content_type = http_res.headers.get("Content-Type")
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
http_res.status_code,
http_res.text,
http_res_text,
http_res,
)
@@ -330,15 +334,17 @@ class Search(BaseSDK):
data.raw_response = http_res
raise errors.PerformVoiceSearchUnauthorized(data=data)
if utils.match_response(http_res, ["4XX", "5XX"], "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res.text, http_res
"API error occurred", http_res.status_code, http_res_text, http_res
)
content_type = http_res.headers.get("Content-Type")
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
http_res.status_code,
http_res.text,
http_res_text,
http_res,
)
@@ -435,15 +441,17 @@ class Search(BaseSDK):
data.raw_response = http_res
raise errors.PerformVoiceSearchUnauthorized(data=data)
if utils.match_response(http_res, ["4XX", "5XX"], "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res.text, http_res
"API error occurred", http_res.status_code, http_res_text, http_res
)
content_type = http_res.headers.get("Content-Type")
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
http_res.status_code,
http_res.text,
http_res_text,
http_res,
)
@@ -533,15 +541,17 @@ class Search(BaseSDK):
data.raw_response = http_res
raise errors.GetSearchResultsUnauthorized(data=data)
if utils.match_response(http_res, ["4XX", "5XX"], "*"):
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res.text, http_res
"API error occurred", http_res.status_code, http_res_text, http_res
)
content_type = http_res.headers.get("Content-Type")
http_res_text = utils.stream_to_text(http_res)
raise errors.SDKError(
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
http_res.status_code,
http_res.text,
http_res_text,
http_res,
)
@@ -631,14 +641,16 @@ class Search(BaseSDK):
data.raw_response = http_res
raise errors.GetSearchResultsUnauthorized(data=data)
if utils.match_response(http_res, ["4XX", "5XX"], "*"):
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
"API error occurred", http_res.status_code, http_res.text, http_res
"API error occurred", http_res.status_code, http_res_text, http_res
)
content_type = http_res.headers.get("Content-Type")
http_res_text = await utils.stream_to_text_async(http_res)
raise errors.SDKError(
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
http_res.status_code,
http_res.text,
http_res_text,
http_res,
)