File tree Expand file tree Collapse file tree 4 files changed +4
-10
lines changed
Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 4040 ChatCreationProhibitedError ,
4141 InvalidUsersListError ,
4242 ThreadCreationError ,
43- ThreadCreationEventNotFoundError ,
4443 ThreadCreationProhibitedError ,
4544)
4645from pybotx .client .exceptions .common import (
Original file line number Diff line number Diff line change 1- import typing
21from typing import Literal
32from uuid import UUID
43
54from pybotx .client .authorized_botx_method import AuthorizedBotXMethod
65from pybotx .client .botx_method import response_exception_thrower
76from pybotx .client .exceptions .chats import (
87 ThreadCreationError ,
9- ThreadCreationEventNotFoundError ,
108 ThreadCreationProhibitedError ,
119)
10+ from pybotx .client .exceptions .event import EventNotFoundError
1211from pybotx .models .api_base import UnverifiedPayloadBaseModel , VerifiedPayloadBaseModel
1312
1413
@@ -36,7 +35,7 @@ class CreateThreadMethod(AuthorizedBotXMethod):
3635 status_handlers = {
3736 ** AuthorizedBotXMethod .status_handlers ,
3837 403 : response_exception_thrower (ThreadCreationProhibitedError ),
39- 404 : response_exception_thrower (ThreadCreationEventNotFoundError ),
38+ 404 : response_exception_thrower (EventNotFoundError ),
4039 422 : response_exception_thrower (ThreadCreationError ),
4140 }
4241
Original file line number Diff line number Diff line change @@ -34,7 +34,3 @@ class ThreadCreationProhibitedError(BaseClientError):
3434 9. Message in stealth mode
3535 10. Message is deleted
3636 """
37-
38-
39- class ThreadCreationEventNotFoundError (BaseClientError ):
40- """Event not found"""
Original file line number Diff line number Diff line change 99from pybotx import (
1010 Bot ,
1111 BotAccountWithSecret ,
12+ EventNotFoundError ,
1213 HandlerCollector ,
1314 ThreadCreationError ,
14- ThreadCreationEventNotFoundError ,
1515 ThreadCreationProhibitedError ,
1616 lifespan_wrapper ,
1717)
@@ -173,7 +173,7 @@ async def test__create_chat__succeed(
173173 "error_data" : {"bot_id" : "24348246-6791-4ac0-9d86-b948cd6a0e46" },
174174 },
175175 HTTPStatus .NOT_FOUND ,
176- ThreadCreationEventNotFoundError ,
176+ EventNotFoundError ,
177177 ),
178178 (
179179 {
You can’t perform that action at this time.
0 commit comments