Debian Codegraph @

pkg/services/push/homeassistant/homeassistant_errors.go

raw
1 package homeassistant
2
3 import "errors"
4
5 var (
6 // ErrTokenMissing indicates that the long-lived access token is absent from the URL.
7 ErrTokenMissing = errors.New("homeassistant access token is missing")
8
9 // ErrHostMissing indicates that the Home Assistant hostname is absent from the URL.
10 ErrHostMissing = errors.New("homeassistant host is missing")
11
12 // ErrMessageEmpty indicates that the notification message is empty.
13 ErrMessageEmpty = errors.New("homeassistant message is empty")
14
15 // ErrInvalidService indicates that the service query value is not a valid domain.action pair.
16 ErrInvalidService = errors.New("homeassistant service is invalid")
17
18 // ErrInvalidPort indicates that the URL port is not a valid TCP port.
19 ErrInvalidPort = errors.New("homeassistant port is invalid")
20
21 // ErrSendFailed indicates that sending a Home Assistant notification failed.
22 ErrSendFailed = errors.New("failed to send homeassistant notification")
23
24 // ErrUnexpectedStatus indicates that the Home Assistant API returned a non-success HTTP status.
25 ErrUnexpectedStatus = errors.New("homeassistant API returned unexpected status")
26 )