summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/Rhymen/go-whatsapp/errors.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-01-31 00:27:37 +0100
committerWim <wim@42.be>2022-03-20 14:57:48 +0100
commite3cafeaf9292f67459ff1d186f68283bfaedf2ae (patch)
treeb69c39620aa91dba695b3b935c6651c0fb37ce75 /vendor/github.com/Rhymen/go-whatsapp/errors.go
parente7b193788a56ee7cdb02a87a9db0ad6724ef66d5 (diff)
downloadmatterbridge-msglm-e3cafeaf9292f67459ff1d186f68283bfaedf2ae.tar.gz
matterbridge-msglm-e3cafeaf9292f67459ff1d186f68283bfaedf2ae.tar.bz2
matterbridge-msglm-e3cafeaf9292f67459ff1d186f68283bfaedf2ae.zip
Add dependencies/vendor (whatsapp)
Diffstat (limited to 'vendor/github.com/Rhymen/go-whatsapp/errors.go')
-rw-r--r--vendor/github.com/Rhymen/go-whatsapp/errors.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/errors.go b/vendor/github.com/Rhymen/go-whatsapp/errors.go
deleted file mode 100644
index 2f58a771..00000000
--- a/vendor/github.com/Rhymen/go-whatsapp/errors.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package whatsapp
-
-import (
- "fmt"
-
- "github.com/pkg/errors"
-)
-
-var (
- ErrAlreadyConnected = errors.New("already connected")
- ErrAlreadyLoggedIn = errors.New("already logged in")
- ErrInvalidSession = errors.New("invalid session")
- ErrLoginInProgress = errors.New("login or restore already running")
- ErrNotConnected = errors.New("not connected")
- ErrInvalidWsData = errors.New("received invalid data")
- ErrInvalidWsState = errors.New("can't handle binary data when not logged in")
- ErrConnectionTimeout = errors.New("connection timed out")
- ErrMissingMessageTag = errors.New("no messageTag specified or to short")
- ErrInvalidHmac = errors.New("invalid hmac")
- ErrInvalidServerResponse = errors.New("invalid response received from server")
- ErrServerRespondedWith404 = errors.New("server responded with status 404")
- ErrInvalidWebsocket = errors.New("invalid websocket")
- ErrMessageTypeNotImplemented = errors.New("message type not implemented")
- ErrOptionsNotProvided = errors.New("new conn options not provided")
-)
-
-type ErrConnectionFailed struct {
- Err error
-}
-
-func (e *ErrConnectionFailed) Error() string {
- return fmt.Sprintf("connection to WhatsApp servers failed: %v", e.Err)
-}
-
-type ErrConnectionClosed struct {
- Code int
- Text string
-}
-
-func (e *ErrConnectionClosed) Error() string {
- return fmt.Sprintf("server closed connection,code: %d,text: %s", e.Code, e.Text)
-}