Module Errors

27 21 pallets 326 errors

Wraps pallet-specific errors with pallet index and error bytes

How Module Error Encoding Works

A ModuleError contains two fields: an index (u8) that identifies the pallet, and an error ([u8; 4]) where the first byte identifies the specific error within that pallet's error enum.

To decode: look up the pallet by index in the mapping table below, then find the error by the first byte of error in that pallet's errors list.

Fields

NameTypeDescription
indexu8Pallet index — maps to pallet.index in pallet files
error[u8; 4]Error bytes — first byte is the error index within the pallet's error enum

Pallet Mapping

The index field maps to a pallet. Each pallet defines its own error enum with pallet-specific error codes.

Pallet IndexPallet NameActive Errors
0System 9 errors
4Grandpa 7 errors
5Balances 12 errors
7SubtensorModule 135 errors
11Utility 2 errors
12Sudo 1 error
13Multisig 14 errors
14Preimage 8 errors
15Scheduler 5 errors
16Proxy 10 errors
17Registry 3 errors
18Commitments 4 errors
19AdminUtils 11 errors
20SafeMode 7 errors
21Ethereum 2 errors
22EVM 15 errors
26Drand 6 errors
27Crowdloan 22 errors
28Swap 14 errors
29Contracts 37 errors
30MevShield 2 errors

Type Information

Type ID
27
Path
sp_runtime::ModuleError
Pallets with Errors
21
Runtime
v393