Commit Graph

43 Commits

Author SHA1 Message Date
Tulir Asokan
95dc775344
Fix errors found by new tests (#1389) 2020-02-14 18:35:42 +01:00
Lonami Exo
bcfc3e7550 Remove invalid error inits and move bad msg error 2019-05-15 13:58:19 +02:00
Lonami Exo
5ed7bf7815 Fix timeout error not being excepted on Button.click 2019-05-05 19:57:09 +02:00
Lonami Exo
1e17ef1c98 Apply several lints 2019-05-03 21:38:41 +02:00
Lonami Exo
56595e4a9c Treat all error codes as positive
This means that -500 errors will now behave like 500 errors
correctly so the -500 "No workers running" will properly be
caught and the library will retry requests by default.
2019-04-23 11:28:09 +02:00
Lonami Exo
99129daeee Show the request that caused RPC errors in their messages 2018-10-15 18:35:51 +02:00
Lonami Exo
0094eb391e Support exclusive conversations by default 2018-10-12 22:17:07 +02:00
Lonami Exo
6e77f583f1 Detect arbitrary negative HTTP error codes 2018-10-12 19:47:40 +02:00
s3mple
29d122e810 Fix-up previous commit f17d7e9 (#967) 2018-08-24 19:50:55 +02:00
s3mple
f17d7e9c5e New exception class for multiple errors (#965) 2018-08-24 18:25:58 +02:00
Lonami Exo
c1d67f35c9 Fix creating unknown RPCError messages with known code failing 2018-08-04 00:43:53 +02:00
Lonami Exo
cc4c620261 Show more information for bare RPCError (#919) 2018-07-29 12:40:40 +02:00
josephbiko
e6981e7676 Remove empty except (#887) 2018-07-09 20:54:43 +02:00
Lonami Exo
4e9a84c3b5 Remove underscore from module names 2018-06-18 21:02:42 +02:00
Lonami Exo
fbf3bf119c Separate errors needing regex from those which don't 2018-06-18 19:09:45 +02:00
Lonami Exo
aa6d3430ae Properly handle bot timeouts when clicking buttons 2018-06-11 10:20:22 +02:00
Lonami Exo
be279ce3f5 Make TLMessage always have a valid TLObject
This simplifies the flow instead of having separate request/body
attributes, and also means that BinaryReader.tgread_object() can
be used without so many special cases.
2018-06-09 13:48:27 +02:00
Lonami Exo
f7e8907c6f Create RpcResult class and generalise core special cases
This results in a cleaner MTProtoSender, which now can always
read a TLObject with a guaranteed item, if the message is OK.
2018-06-09 13:13:55 +02:00
Lonami Exo
200d3c0360 Clean-up unused methods and reuse more common utils 2018-04-14 17:22:39 +02:00
vegeta1k95
bd1b0ecdb4 Make RPCError class picklable (#751) 2018-04-08 16:48:55 +02:00
Lonami Exo
500792975e Handle AUTH_KEY_DUPLICATED on connection 2018-03-30 12:18:18 +02:00
Dmitry D. Chernov
55bcc29ae0 Errors: Fix passing 'self' to the constructors of the superclasses
This is necessary only if the superclass name is specified explicitly instead of super() call.
2018-02-14 17:09:22 +10:00
Dmitry D. Chernov
6ec6967ff9 Make exception types correspond to Python docs 2017-12-28 09:48:02 +10:00
Lonami Exo
71eb542626 Document the errors/ module 2017-11-26 17:06:09 +01:00
Lonami Exo
38ccd6d1d9 Generate errors from PWRTelegram's API 2017-10-20 17:20:05 +02:00
Lonami Exo
354ea1c0c8 Add ChannelPrivateError error 2017-10-01 18:53:12 +02:00
Lonami Exo
33dbac6350 Add some missing BadRequest errors 2017-09-30 19:00:32 +02:00
Lonami Exo
edcd23f94c Making timeout when reporting an error shorter 2017-09-25 12:00:09 +02:00
Lonami Exo
493f5cec1f Fix-up target method typo 2017-09-25 11:57:42 +02:00
Lonami Exo
01c91bb895 Report errors in the background not to interfer with users (#262) 2017-09-25 11:56:44 +02:00
Lonami Exo
e0e3947d2f Fix some misleading errors/documentation 2017-09-18 09:37:20 +02:00
Lonami Exo
78155a21bd Retry authentication for auth keys up to five times by default 2017-09-17 19:15:43 +02:00
Lonami Exo
e7a936222f Catch -404 BrokenAuthKeyError on .connect()'s .do_authentication 2017-09-17 18:38:03 +02:00
Birger Jarl
edf325d580 Fix username regex (#235)
Username max length is 1+31 = 32
2017-09-07 09:41:49 +02:00
xkdnyan
cd40f4a949 Add RPCError for MESSAGE_NOT_MODIFIED (#231) 2017-09-05 17:06:35 +02:00
Lonami Exo
97cab7347b Make lint happier 2017-09-04 17:10:04 +02:00
Lonami Exo
b504ce14bc Verify the files downloaded from CDNs and raise on sha256 mismatch 2017-08-28 14:17:31 +02:00
Lonami Exo
00b5b5021b Report errors to pwrtelegram.xyz by default 2017-08-25 15:34:20 +02:00
Lonami Exo
23e2802215 Update to layer 68 2017-06-30 11:48:45 +02:00
Lonami Exo
459e988ff5 Rename rpc_n_errors dictionary to rpc_errors_n_all 2017-06-24 18:10:05 +02:00
Lonami
be33ae4e80 Fix rpc_message_to_error failing to construct them 2017-06-17 08:25:48 +02:00
Lonami Exo
3fccfd40e6 Show error messages on non-specialized error classes (closes #113) 2017-06-15 15:25:05 +02:00
Lonami Exo
44ab85962b Completely change errors (make one class for each) 2017-06-10 11:47:51 +02:00