System::Error

Variant 122 v393

frame_system::pallet::Error

Error for the System pallet

About This Type

Error enum for the Error pallet.

Contains all error types that the Error pallet can return when a call fails.

Variants (9)

IndexNameFieldsDocs
0InvalidSpecNamenoneThe name of specification does not match between the current runtime and the new runtime.
1SpecVersionNeedsToIncreasenoneThe specification version is not allowed to decrease between the current runtime and the new runtime.
2FailedToExtractRuntimeVersionnoneFailed to extract the runtime version from the new runtime. Either calling `Core_version` or decoding `RuntimeVersion` failed.
3NonDefaultCompositenoneSuicide called when the account has non-default composite data.
4NonZeroRefCountnoneThere is a non-zero reference count preventing the account from being purged.
5CallFilterednoneThe origin filter prevent the call to be dispatched.
6MultiBlockMigrationsOngoingnoneA multi-block migration is ongoing and prevents the current code from being replaced.
7NothingAuthorizednoneNo upgrade authorized.
8UnauthorizednoneThe submitted code is not authorized.

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 9 possible variants.
Size
variable (1+ bytes)

Examples

InvalidSpecName
0x00
00 Variant index 0 = InvalidSpecName
SpecVersionNeedsToIncrease
0x01
01 Variant index 1 = SpecVersionNeedsToIncrease
FailedToExtractRuntimeVersion
0x02
02 Variant index 2 = FailedToExtractRuntimeVersion

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode System::Error — variant "InvalidSpecName"
const value = registry.createType("System::Error", "InvalidSpecName");
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (21)

and 1 more...

Also See

Type Information

Type ID
122
Kind
Variant
Path
frame_system::pallet::Error
Runtime
v393