RPC Errors¶
All FTMGram API errors live inside the errors sub-package: ftmgram.errors.
The errors ids listed here are shown as UPPER_SNAKE_CASE, but the actual exception names to import from FTMGram
follow the usual PascalCase convention.
from ftmgram.errors import FloodWait
try:
...
except FloodWait as e:
...
RPC Errors
There isn’t any official list of all possible RPC errors, so the list of known errors is provided on a best-effort basis. When new methods are available, the list may be lacking since we simply don’t know what errors can raise from them. FTMGram creates an unknown_errors.txt file in the root directory from where the Client is run.
PLEASE DO NOT DO THIS
Tip
If you want the file to be created in a different location, set the FTMGRAM_LOG_UNKNOWN_ERRORS_FILENAME environment variable to an absolute file path of your choice.
Tip
If you do not want this file to be created, set the FTMGRAM_DONOT_LOG_UNKNOWN_ERRORS environment variable before running the FTMGram Client.