18 lines
726 B
Go
18 lines
726 B
Go
package telegram
|
|
|
|
import "errors"
|
|
|
|
// Sentinel errors returned by the Telegram adapter. Consumers test for them
|
|
// with errors.Is; failures that mean "not connected" wrap adapter.ErrNotConnected
|
|
// so the shared channel sentinel still matches.
|
|
var (
|
|
// ErrMissingToken is returned when no BotToken is configured.
|
|
ErrMissingToken = errors.New("telegram: missing bot token")
|
|
// ErrBadResponse is returned when the Bot API replies with OK=false or an
|
|
// unexpected payload shape.
|
|
ErrBadResponse = errors.New("telegram: bad bot api response")
|
|
// ErrNoChatTarget is returned when an outbound message carries no usable
|
|
// conversation/group identifier.
|
|
ErrNoChatTarget = errors.New("telegram: message has no target chat")
|
|
)
|