1414from ..errors .bad_request_error import BadRequestError
1515from ..errors .internal_server_error import InternalServerError
1616from ..errors .not_found_error import NotFoundError
17- from ..errors .payment_required_error import PaymentRequiredError
1817from ..errors .unprocessable_entity_error import UnprocessableEntityError
19- from ..types .insufficient_credits_error import InsufficientCreditsError
2018from ..types .supported_ll_ms import SupportedLlMs
2119from ..types .task_created_response import TaskCreatedResponse
2220from ..types .task_list_response import TaskListResponse
@@ -230,17 +228,6 @@ def create_task(
230228 ),
231229 ),
232230 )
233- if _response .status_code == 402 :
234- raise PaymentRequiredError (
235- headers = dict (_response .headers ),
236- body = typing .cast (
237- InsufficientCreditsError ,
238- construct_type (
239- type_ = InsufficientCreditsError , # type: ignore
240- object_ = _response .json (),
241- ),
242- ),
243- )
244231 if _response .status_code == 404 :
245232 raise NotFoundError (
246233 headers = dict (_response .headers ),
@@ -263,17 +250,6 @@ def create_task(
263250 ),
264251 ),
265252 )
266- if _response .status_code == 500 :
267- raise InternalServerError (
268- headers = dict (_response .headers ),
269- body = typing .cast (
270- typing .Optional [typing .Any ],
271- construct_type (
272- type_ = typing .Optional [typing .Any ], # type: ignore
273- object_ = _response .json (),
274- ),
275- ),
276- )
277253 _response_json = _response .json ()
278254 except JSONDecodeError :
279255 raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response .text )
@@ -682,17 +658,6 @@ async def create_task(
682658 ),
683659 ),
684660 )
685- if _response .status_code == 402 :
686- raise PaymentRequiredError (
687- headers = dict (_response .headers ),
688- body = typing .cast (
689- InsufficientCreditsError ,
690- construct_type (
691- type_ = InsufficientCreditsError , # type: ignore
692- object_ = _response .json (),
693- ),
694- ),
695- )
696661 if _response .status_code == 404 :
697662 raise NotFoundError (
698663 headers = dict (_response .headers ),
@@ -715,17 +680,6 @@ async def create_task(
715680 ),
716681 ),
717682 )
718- if _response .status_code == 500 :
719- raise InternalServerError (
720- headers = dict (_response .headers ),
721- body = typing .cast (
722- typing .Optional [typing .Any ],
723- construct_type (
724- type_ = typing .Optional [typing .Any ], # type: ignore
725- object_ = _response .json (),
726- ),
727- ),
728- )
729683 _response_json = _response .json ()
730684 except JSONDecodeError :
731685 raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response .text )
0 commit comments