forked from algorand/indexer
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patherror_messages.go
More file actions
65 lines (60 loc) · 4.11 KB
/
error_messages.go
File metadata and controls
65 lines (60 loc) · 4.11 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package api
import (
"fmt"
"github.com/algorand/indexer/v3/idb"
"github.com/algorand/indexer/v3/util"
)
// constant error messages.
const (
errInvalidRoundAndMinMax = "cannot specify round and min-round/max-round"
errInvalidRoundMinMax = "min-round must be less than max-round"
errInvalidTimeMinMax = "after-time must be less than before-time"
errUnableToParseAddress = "unable to parse address"
errInvalidCreatorAddress = "found an invalid creator address"
errUnableToParseBase64 = "unable to parse base64 data"
errBadGroupIDLen = "bad length for group ID"
errUnableToParseDigest = "unable to parse base32 digest data"
errUnableToParseNext = "unable to parse next token"
errUnableToDecodeTransaction = "unable to decode transaction bytes"
errFailedSearchingAccount = "failed while searching for account"
errFailedSearchingAsset = "failed while searching for asset"
errFailedSearchingAssetBalances = "failed while searching for asset balances"
errFailedSearchingApplication = "failed while searching for application"
errFailedSearchingBoxes = "failed while searching for application boxes"
errFailedLookingUpHealth = "failed while getting indexer health"
errNoApplicationsFound = "no application found for application-id"
ErrNoBoxesFound = "no application boxes found"
ErrWrongAppidFound = "the wrong application-id was found, please contact us, this shouldn't happen"
ErrWrongBoxFound = "a box with an unexpected name was found, please contact us, this shouldn't happen"
ErrNoAccountsFound = "no accounts found for address"
errNoAssetsFound = "no assets found for asset-id"
errNoTransactionFound = "no transaction found for transaction id"
errMultipleTransactions = "multiple transactions found for this txid, please contact us, this shouldn't happen"
errMultipleAccounts = "multiple accounts found for this address, please contact us, this shouldn't happen"
errMultipleAssets = "multiple assets found for this id, please contact us, this shouldn't happen"
errMultipleApplications = "multiple applications found for this id, please contact us, this shouldn't happen"
ErrMultipleBoxes = "multiple application boxes found for this app id and box name, please contact us, this shouldn't happen"
ErrFailedLookingUpBoxes = "failed while looking up application boxes"
errRewindingAccountNotSupported = "rewinding account is no longer supported, please remove the `round=` query parameter and try again"
errLookingUpBlockForRound = "error while looking up block for round"
errBlockHeaderSearch = "error while searching for block headers"
errTransactionSearch = "error while searching for transaction"
errZeroAddressCloseRemainderToRole = "searching transactions by zero address with close address role is not supported"
errZeroAddressAssetSenderRole = "searching transactions by zero address with asset sender role is not supported"
errZeroAddressAssetCloseToRole = "searching transactions by zero address with asset close address role is not supported"
ErrResultLimitReached = "Result limit exceeded"
errValueExceedingInt64 = "searching by round or application-id or asset-id or filter by value greater than 9223372036854775807 is not supported"
errTransactionsLimitReached = "Max transactions limit exceeded. header-only flag should be enabled"
ErrBoxNotFound = "box not found"
)
var errUnknownAddressRole string
var errUnknownTxType string
var errUnknownSigType string
func init() {
errUnknownAddressRole = fmt.Sprintf(
"unknown address role [valid roles: %s]", util.KeysStringBool(addressRoleEnumMap))
errUnknownTxType = fmt.Sprintf(
"unknown tx-type [valid types: %s]", idb.TxnTypeEnumString)
errUnknownSigType = fmt.Sprintf(
"unknown sig-type [valid types: %s]", idb.SigTypeEnumString)
}