This repository was archived by the owner on May 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherrors.go
More file actions
32 lines (29 loc) · 1.35 KB
/
Copy patherrors.go
File metadata and controls
32 lines (29 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package sms_activate_go
import (
"errors"
)
const (
badKeyMsg = "BAD_KEY"
errorSQLMsg = "ERROR_SQL"
noNumbersMsg = "NO_NUMBERS"
noBalanceMsg = "NO_BALANCE"
noOperatorsMsg = `{"status":"error","error":"OPERATORS_NOT_FOUND"}`
noActivationsMsg = `{"status":"error","error":"NO_ACTIVATIONS"}`
wrongActivationIDMsg = "WRONG_ACTIVATION_ID"
earlyCancelMsg = "EARLY_CANCEL_DENIED"
)
var (
ErrBadLength = errors.New("one or more params have wrong length")
ErrBadLengthKey = errors.New("bad length key")
ErrUnknownResp = errors.New("unknown response")
ErrBadKey = errors.New("invalid API access key")
BadCountryNum = errors.New("the country number must be at least -1 and no more than 196")
ErrSQL = errors.New("one of the params has an invalid value")
ErrNoNumbers = errors.New("there are no free numbers for receiving SMS from this service")
ErrNoBalance = errors.New("not enough funds on current api key")
ErrNoOperators = errors.New("have no operators in this country")
ErrNoActivations = errors.New("have no active activations")
ErrWrongActivationID = errors.New("wrong activation id")
ErrWrongStatus = errors.New("wrong status provided")
ErrEarlyCancel = errors.New("cannot cancel the number within the first 2 minutes")
)