Skip to content

Commit ab60d01

Browse files
committed
Release 1.3.4
1 parent 6e4c2c9 commit ab60d01

File tree

4 files changed

+130
-130
lines changed

4 files changed

+130
-130
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "multion"
3-
version = "1.3.3"
3+
version = "1.3.4"
44
description = ""
55
readme = "README.md"
66
authors = []

src/multion/base_client.py

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -178,29 +178,29 @@ def browse(
178178
request_options=request_options,
179179
omit=OMIT,
180180
)
181-
if 200 <= _response.status_code < 300:
182-
return typing.cast(BrowseOutput, construct_type(type_=BrowseOutput, object_=_response.json())) # type: ignore
183-
if _response.status_code == 400:
184-
raise BadRequestError(
185-
typing.cast(BadRequestResponse, construct_type(type_=BadRequestResponse, object_=_response.json())) # type: ignore
186-
)
187-
if _response.status_code == 401:
188-
raise UnauthorizedError(
189-
typing.cast(UnauthorizedResponse, construct_type(type_=UnauthorizedResponse, object_=_response.json())) # type: ignore
190-
)
191-
if _response.status_code == 402:
192-
raise PaymentRequiredError(
193-
typing.cast(PaymentRequiredResponse, construct_type(type_=PaymentRequiredResponse, object_=_response.json())) # type: ignore
194-
)
195-
if _response.status_code == 422:
196-
raise UnprocessableEntityError(
197-
typing.cast(HttpValidationError, construct_type(type_=HttpValidationError, object_=_response.json())) # type: ignore
198-
)
199-
if _response.status_code == 500:
200-
raise InternalServerError(
201-
typing.cast(InternalServerErrorResponse, construct_type(type_=InternalServerErrorResponse, object_=_response.json())) # type: ignore
202-
)
203181
try:
182+
if 200 <= _response.status_code < 300:
183+
return typing.cast(BrowseOutput, construct_type(type_=BrowseOutput, object_=_response.json())) # type: ignore
184+
if _response.status_code == 400:
185+
raise BadRequestError(
186+
typing.cast(BadRequestResponse, construct_type(type_=BadRequestResponse, object_=_response.json())) # type: ignore
187+
)
188+
if _response.status_code == 401:
189+
raise UnauthorizedError(
190+
typing.cast(UnauthorizedResponse, construct_type(type_=UnauthorizedResponse, object_=_response.json())) # type: ignore
191+
)
192+
if _response.status_code == 402:
193+
raise PaymentRequiredError(
194+
typing.cast(PaymentRequiredResponse, construct_type(type_=PaymentRequiredResponse, object_=_response.json())) # type: ignore
195+
)
196+
if _response.status_code == 422:
197+
raise UnprocessableEntityError(
198+
typing.cast(HttpValidationError, construct_type(type_=HttpValidationError, object_=_response.json())) # type: ignore
199+
)
200+
if _response.status_code == 500:
201+
raise InternalServerError(
202+
typing.cast(InternalServerErrorResponse, construct_type(type_=InternalServerErrorResponse, object_=_response.json())) # type: ignore
203+
)
204204
_response_json = _response.json()
205205
except JSONDecodeError:
206206
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -302,13 +302,13 @@ def retrieve(
302302
request_options=request_options,
303303
omit=OMIT,
304304
)
305-
if 200 <= _response.status_code < 300:
306-
return typing.cast(RetrieveOutput, construct_type(type_=RetrieveOutput, object_=_response.json())) # type: ignore
307-
if _response.status_code == 422:
308-
raise UnprocessableEntityError(
309-
typing.cast(HttpValidationError, construct_type(type_=HttpValidationError, object_=_response.json())) # type: ignore
310-
)
311305
try:
306+
if 200 <= _response.status_code < 300:
307+
return typing.cast(RetrieveOutput, construct_type(type_=RetrieveOutput, object_=_response.json())) # type: ignore
308+
if _response.status_code == 422:
309+
raise UnprocessableEntityError(
310+
typing.cast(HttpValidationError, construct_type(type_=HttpValidationError, object_=_response.json())) # type: ignore
311+
)
312312
_response_json = _response.json()
313313
except JSONDecodeError:
314314
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -463,29 +463,29 @@ async def browse(
463463
request_options=request_options,
464464
omit=OMIT,
465465
)
466-
if 200 <= _response.status_code < 300:
467-
return typing.cast(BrowseOutput, construct_type(type_=BrowseOutput, object_=_response.json())) # type: ignore
468-
if _response.status_code == 400:
469-
raise BadRequestError(
470-
typing.cast(BadRequestResponse, construct_type(type_=BadRequestResponse, object_=_response.json())) # type: ignore
471-
)
472-
if _response.status_code == 401:
473-
raise UnauthorizedError(
474-
typing.cast(UnauthorizedResponse, construct_type(type_=UnauthorizedResponse, object_=_response.json())) # type: ignore
475-
)
476-
if _response.status_code == 402:
477-
raise PaymentRequiredError(
478-
typing.cast(PaymentRequiredResponse, construct_type(type_=PaymentRequiredResponse, object_=_response.json())) # type: ignore
479-
)
480-
if _response.status_code == 422:
481-
raise UnprocessableEntityError(
482-
typing.cast(HttpValidationError, construct_type(type_=HttpValidationError, object_=_response.json())) # type: ignore
483-
)
484-
if _response.status_code == 500:
485-
raise InternalServerError(
486-
typing.cast(InternalServerErrorResponse, construct_type(type_=InternalServerErrorResponse, object_=_response.json())) # type: ignore
487-
)
488466
try:
467+
if 200 <= _response.status_code < 300:
468+
return typing.cast(BrowseOutput, construct_type(type_=BrowseOutput, object_=_response.json())) # type: ignore
469+
if _response.status_code == 400:
470+
raise BadRequestError(
471+
typing.cast(BadRequestResponse, construct_type(type_=BadRequestResponse, object_=_response.json())) # type: ignore
472+
)
473+
if _response.status_code == 401:
474+
raise UnauthorizedError(
475+
typing.cast(UnauthorizedResponse, construct_type(type_=UnauthorizedResponse, object_=_response.json())) # type: ignore
476+
)
477+
if _response.status_code == 402:
478+
raise PaymentRequiredError(
479+
typing.cast(PaymentRequiredResponse, construct_type(type_=PaymentRequiredResponse, object_=_response.json())) # type: ignore
480+
)
481+
if _response.status_code == 422:
482+
raise UnprocessableEntityError(
483+
typing.cast(HttpValidationError, construct_type(type_=HttpValidationError, object_=_response.json())) # type: ignore
484+
)
485+
if _response.status_code == 500:
486+
raise InternalServerError(
487+
typing.cast(InternalServerErrorResponse, construct_type(type_=InternalServerErrorResponse, object_=_response.json())) # type: ignore
488+
)
489489
_response_json = _response.json()
490490
except JSONDecodeError:
491491
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -587,13 +587,13 @@ async def retrieve(
587587
request_options=request_options,
588588
omit=OMIT,
589589
)
590-
if 200 <= _response.status_code < 300:
591-
return typing.cast(RetrieveOutput, construct_type(type_=RetrieveOutput, object_=_response.json())) # type: ignore
592-
if _response.status_code == 422:
593-
raise UnprocessableEntityError(
594-
typing.cast(HttpValidationError, construct_type(type_=HttpValidationError, object_=_response.json())) # type: ignore
595-
)
596590
try:
591+
if 200 <= _response.status_code < 300:
592+
return typing.cast(RetrieveOutput, construct_type(type_=RetrieveOutput, object_=_response.json())) # type: ignore
593+
if _response.status_code == 422:
594+
raise UnprocessableEntityError(
595+
typing.cast(HttpValidationError, construct_type(type_=HttpValidationError, object_=_response.json())) # type: ignore
596+
)
597597
_response_json = _response.json()
598598
except JSONDecodeError:
599599
raise ApiError(status_code=_response.status_code, body=_response.text)

src/multion/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1717
headers: typing.Dict[str, str] = {
1818
"X-Fern-Language": "Python",
1919
"X-Fern-SDK-Name": "multion",
20-
"X-Fern-SDK-Version": "1.3.3",
20+
"X-Fern-SDK-Version": "1.3.4",
2121
}
2222
headers["X_MULTION_API_KEY"] = self.api_key
2323
return headers

0 commit comments

Comments
 (0)