Error Handling ๐Ÿ”ง

API Error Codes

Error codes are essential for figuring out what's wrong when a server and a bot talk to each other, and WebSocket APIs are no different. In this overview, we'll explain some of the most common errors you will encounter. This is how the error response is shown โžก๏ธ

Message

This error code is related to all types of messages; Message, Photo, Video, Audio, Voice and Document.

Error CodeDescription
500001No message type
500003No message
500004Message is too long
500007Attachment not found
500008Invalid message type
500010Caption is too long
500012No reference
500013No text message
500040Sender is not a member

Blacklist

This error code is related to User Blacklist.

Error CodeDescription
500089Invalid blacklist pattern
500090Blacklist pattern is not matching
188888Blacklisted user

Whitelist

This error code is related to User Whitelist.

Error CodeDescription
500089Invalid whitelist pattern
500090Blacklist pattern is not matching
188889User is not whitelisted

No Privilege

This error code is related to Chat Admins.

Error CodeDescription
160017User has no privilege

Other

This error code is related to any other type of errors.

Error CodeDescription
199999Other errors
199997No id
100099Authentication Error
199992Another instance of the same bot is already running. Only one instance should be running
199990Operation not permitted
Language