Skip to content

Commit

Permalink
add error codes doc and flow-docs json file
Browse files Browse the repository at this point in the history
  • Loading branch information
bthaile committed Feb 17, 2023
1 parent 9f5d740 commit 48066ae
Show file tree
Hide file tree
Showing 2 changed files with 345 additions and 0 deletions.
324 changes: 324 additions & 0 deletions docs/error-codes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,324 @@
## Error Codes
List of error codes returned from failing transactions and scripts. The error code has an accompanied error message that usually gives more clarification. This list is meant to give more information and helpful hints.
[Code file](https://github.com/onflow/flow-go/blob/master/fvm/errors/codes.go)

### 1006
**ErrCodeInvalidProposalSignatureError**

Example:
```...```

Description:

### 1007
**ErrCodeInvalidProposalSeqNumberError**

Example:
```[Error Code: 1007] invalid proposal key: public key 0 on account xxx has sequence number xxx, but given xxx```

Description:


### 1008
**ErrCodeInvalidPayloadSignatureError**

Example:
```[Error Code: 1008] invalid payload signature: public key 0 on account xxx does not have a valid signature: signature is not valid
```

Description:


### 1009
**ErrCodeInvalidEnvelopeSignatureError**

Example:
```[Error Code: 1009] invalid envelope key: public key 1 on account xxx does not have a valid signature: signature is not valid
```

Description:


### 1051
**ErrCodeValueError**

Example:
```[Error Code: 1051] invalid value (xxx): invalid encoded public key value: rlp: expected input list for flow.runtimeAccountPublicKeyWrapper...
```

Description:

### 1052
**ErrCodeInvalidArgumentError**

Example:
```[Error Code: 1052] transaction arguments are invalid: (argument is not json decodable: failed to decode value: runtime error: slice bounds out of range [:2] with length 0)
```

Description:

### 1053
**ErrCodeInvalidAddressError**

Example:
```...```

Description:

### 1054
**ErrCodeInvalidLocationError**

Example:
```[Error Code: 1054] location (../contracts/FungibleToken.cdc) is not a valid location: expecting an AddressLocation, but other location types are passed --> ../contracts/FungibleToken.cdc```

Description:

### 1055
**ErrCodeAccountAuthorizationError**

Example:
```[Error Code: 1055] authorization failed for account e85d442d61a611d8: payer account does not have sufficient signatures (1 < 1000)```

Description:

### 1056
**ErrCodeOperationAuthorizationError**

Example:
```[Error Code: 1056] (RemoveContract) is not authorized: removing contracts requires authorization from specific accounts goroutine 5688834491 [running]:```

Description:

### 1057
**ErrCodeOperationNotSupportedError**

Example:
```...```

Description:

### 1101
**ErrCodeCadenceRunTimeError**

Example:
```[Error Code: 1101] cadence runtime error Execution failed: error: pre-condition failed: Amount withdrawn must be less than or equal than the balance of the Vault
```

Description:

### 1103
**ErrCodeStorageCapacityExceeded**

Example:
```[Error Code: 1103] The account with address (xxx) uses 96559611 bytes of storage which is over its capacity (96554500 bytes). Capacity can be increased by adding FLOW tokens to the account.
```

Description:

### 1105
**ErrCodeEventLimitExceededError**

Example:
```[Error Code: 1105] total event byte size (256200) exceeds limit (256000)```

Description:

### 1106
**ErrCodeLedgerInteractionLimitExceededError**

Example:
```[Error Code: 1106] max interaction with storage has exceeded the limit (used: 20276498 bytes, limit 20000000 bytes)```

Description:

### 1107
**ErrCodeStateKeySizeLimitError**

Example:
```...```

Description:

### 1108
**ErrCodeStateValueSizeLimitError**

Example:
```...```

Description:

### 1109
**ErrCodeTransactionFeeDeductionFailedError**

Example:
```[Error Code: 1109] failed to deduct 0 transaction fees from 14af75b8c487333c: Execution failed: --> f919ee77447b7497.FlowFees:97:24```

Description:

### 1110
**ErrCodeComputationLimitExceededError**

Example:
```[Error Code: 1110] computation exceeds limit (100)```

Description:

### 1111
**ErrCodeMemoryLimitExceededError**

Example:
```...```

Description:

### 1112
**ErrCodeCouldNotDecodeExecutionParameterFromState**

Example:
```...```

Description:

### 1114
**ErrCodeScriptExecutionCancelledError**

Example:
```...```

Description:

### 1113
**ErrCodeScriptExecutionTimedOutError**

Example:
```...```

Description:

### 1115
**ErrCodeEventEncodingError**

Example:
```...```

Description:

### 1116
**ErrCodeInvalidInternalStateAccessError**

Example:
```...```

Description:

### 1201
**ErrCodeAccountNotFoundError**

Example:
```[Error Code: 1201] account not found for address xxx```

Description:

### 1202
**ErrCodeAccountPublicKeyNotFoundError**

Example:
```[Error Code: 1202] account public key not found for address xxx and key index 3```

Description:

### 1203
**ErrCodeAccountAlreadyExistsError**

Example:
```...```

Description:

### 1204
**ErrCodeFrozenAccountError**

Example:
```...```

Description:

### 1206
**ErrCodeAccountPublicKeyLimitError**

Example:
```...```

Description:

### 1251
**ErrCodeContractNotFoundError**

Example:
```...```

Description:

### 2000
**FailureCodeUnknownFailure**

Example:
```...```

Description:

### 2001
**FailureCodeEncodingFailure**

Example:
```...```

Description:

### 2002
**FailureCodeLedgerFailure**

Example:
```...```

Description:

### 2003
**FailureCodeStateMergeFailure**

Example:
```...```

Description:

### 2004
**FailureCodeBlockFinderFailure**

Example:
```...```

Description:

### 2006
**FailureCodeParseRestrictedModeInvalidAccessFailure**

Example:
```...```

Description:

### 2007
**FailureCodePayerBalanceCheckFailure**

Example:
```...```

Description:








21 changes: 21 additions & 0 deletions docs/flow-docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"displayName": "Flow Go SDK",
"sidebars": {
"": [
{
"title": "Flow Go SDK",
"items": [
{
"title": "Getting Started",
"href": ""
},
{
"title": "Error Codes",
"href": "error-codes"
}
]
}
]
}
}

0 comments on commit 48066ae

Please sign in to comment.