- Published on
List of Hyperledger Indy Error Codes
- Authors
- Name
- Yair Mark
- @yairmark
The Hyperledger Indy SDK is implemented in Rust and has wrappers written in various other programming languages.
When working with the SDK you run into various error codes like 1003
which can be a bit cryptic and hard to find on Google. After digging through the Rust SDK code a bit I came across a file that has the error codes and associated meaning which can be found here. To fully understand these error codes would require finding usages of them in the Rust SDK. To make this easier to find on Google in future searches an extract from this error code file can be found below:
pub static SUCCESS: Error = Error{code_num:0, message:"Success"};
pub static INDY_WALLET_RECORD_NOT_FOUND: Error = Error{code_num:212, message:"Error from Indy: Wallet Item not found"};
pub static INDY_DUPLICATE_WALLET_RECORD: Error = Error{code_num:213, message:"Error from Indy: Duplicate Wallet Record"};
pub static UNKNOWN_ERROR: Error = Error{code_num:1001, message:"Unknown Error"};
pub static CONNECTION_ERROR: Error = Error{code_num:1002, message:"Error with Connection"};
pub static INVALID_CONNECTION_HANDLE: Error = Error{code_num:1003, message:"Invalid Connection Handle"};
pub static INVALID_CONFIGURATION: Error = Error{code_num:1004, message:"Invalid Configuration"};
pub static NOT_READY: Error = Error{code_num:1005, message:"Object not ready for specified action"};
pub static NO_ENDPOINT: Error = Error{code_num:1006, message:"No Endpoint set for Connection Object"};
pub static INVALID_OPTION: Error = Error{code_num:1007, message:"Invalid Option"};
pub static INVALID_DID: Error = Error{code_num:1008, message:"Invalid DID"};
pub static INVALID_VERKEY: Error = Error{code_num:1009, message:"Invalid VERKEY"};
pub static POST_MSG_FAILURE: Error = Error{code_num:1010, message:"Message failed in post"};
pub static INVALID_NONCE: Error = Error{code_num:1011, message:"Invalid NONCE"};
pub static INVALID_KEY_DELEGATE: Error = Error{code_num:1012, message:"Invalid DELEGATE"};
pub static INVALID_URL: Error = Error{code_num:1013, message:"Invalid URL"};
pub static NOT_BASE58: Error = Error{code_num:1014, message:"Value needs to be base58"};
pub static INVALID_ISSUER_CREDENTIAL_HANDLE: Error = Error{code_num:1015, message:"Invalid Credential Issuer Handle"};
pub static INVALID_JSON: Error = Error{code_num:1016, message:"Invalid JSON string"};
pub static INVALID_PROOF_HANDLE: Error = Error{code_num:1017, message:"Invalid Proof Handle"};
pub static INVALID_CREDENTIAL_REQUEST: Error = Error{code_num:1018, message:"Invalid Credential Request"};
pub static INVALID_MSGPACK: Error = Error{code_num:1019, message:"Invalid MessagePack"};
pub static INVALID_MESSAGES: Error = Error{code_num:1020, message:"Error Retrieving messages from API"};
pub static INVALID_ATTRIBUTES_STRUCTURE: Error = Error{code_num:1021, message: "Attributes provided to Credential Offer are not correct, possibly malformed"};
pub static BIG_NUMBER_ERROR: Error = Error{code_num: 1022, message: "Could not encode string to a big integer."};
pub static INVALID_PROOF: Error = Error{code_num: 1023, message: "Proof had invalid format"};
pub static INVALID_GENESIS_TXN_PATH: Error = Error{code_num: 1024, message: "Must have valid genesis txn file path"};
pub static CREATE_POOL_CONFIG_PARAMETERS: Error = Error{code_num: 1025, message: "Parameters for creating pool config are incorrect."};
pub static CREATE_POOL_CONFIG: Error = Error{code_num: 1026, message: "Formatting for Pool Config are incorrect."};
pub static INVALID_PROOF_CREDENTIAL_DATA: Error = Error{code_num: 1027, message: "The Proof received does not have valid credentials listed."};
pub static INDY_SUBMIT_REQUEST_ERR: Error = Error{code_num: 1028, message: "Call to indy submit request failed"};
pub static BUILD_CREDENTIAL_DEF_REQ_ERR: Error = Error{code_num: 1029, message: "Call to indy credential def request failed"};
pub static NO_POOL_OPEN: Error = Error{code_num: 1030, message: "No Pool open. Can't return handle."};
pub static INVALID_SCHEMA: Error = Error{code_num: 1031, message: "Schema was invalid or corrupt"};
pub static FAILED_PROOF_COMPLIANCE: Error = Error{code_num: 1032, message: "Proof is not compliant to proof request"};
pub static INVALID_HTTP_RESPONSE: Error = Error{code_num: 1033, message: "Invalid HTTP response."};
pub static CREATE_CREDENTIAL_DEF_ERR: Error = Error{code_num: 1034, message: "Call to create Credential Definition failed"};
pub static UNKNOWN_LIBINDY_ERROR: Error = Error{code_num: 1035, message: "Unknown libindy error"};
pub static INVALID_CREDENTIAL_DEF_JSON: Error = Error{code_num: 1036, message: "Credential Def not in valid json"};
pub static INVALID_CREDENTIAL_DEF_HANDLE: Error = Error{code_num: 1037, message: "Invalid Credential Definition handle"};
pub static TIMEOUT_LIBINDY_ERROR: Error = Error{code_num: 1038, message: "Waiting for callback timed out"};
pub static CREDENTIAL_DEF_ALREADY_CREATED: Error = Error{code_num: 1039, message: "Can't create, Credential Def already on ledger"};
pub static INVALID_SCHEMA_SEQ_NO: Error = Error{code_num: 1040, message: "No Schema for that schema sequence number"};
pub static INVALID_SCHEMA_CREATION: Error = Error{code_num: 1041, message: "Could not create schema"};
pub static INVALID_SCHEMA_HANDLE: Error = Error{code_num: 1042, message: "Invalid Schema Handle"};
pub static INVALID_MASTER_SECRET: Error = Error{code_num: 1043, message: "Invalid master secret"};
pub static ALREADY_INITIALIZED: Error = Error{code_num: 1044, message: "Library already initialized"};
pub static INVALID_INVITE_DETAILS: Error = Error{code_num: 1045, message: "Invalid invite details structure"};
pub static INVALID_SELF_ATTESTED_VAL: Error = Error{code_num: 1046, message: "Self Attested Value invalid"};
pub static INVALID_PREDICATE: Error = Error{code_num: 1047, message: "Predicate in proof is invalid"};
pub static INVALID_OBJ_HANDLE: Error = Error{code_num: 1048, message: "Obj was not found with handle"};
pub static INVALID_DISCLOSED_PROOF_HANDLE: Error = Error{code_num: 1049, message: "Obj was not found with handle"};
pub static SERIALIZATION_ERROR: Error = Error{code_num: 1050, message: "Unable to serialize"};
pub static WALLET_ALREADY_EXISTS: Error = Error{code_num: 1051, message: "Indy wallet already exists"};
pub static WALLET_ALREADY_OPEN: Error = Error{code_num: 1052, message: "Indy wallet already open"};
pub static INVALID_CREDENTIAL_HANDLE: Error = Error{code_num: 1053, message: "Invalid credential handle"};
pub static INVALID_CREDENTIAL_JSON: Error = Error{code_num: 1054, message: "Invalid credential json"};
pub static CREATE_CREDENTIAL_REQUEST_ERROR: Error = Error{code_num: 1055, message: "could not create credential request"};
pub static CREATE_PROOF_ERROR: Error = Error{code_num: 1056, message: "could not create proof"};
pub static INVALID_WALLET_HANDLE: Error = Error{code_num: 1057, message: "Invalid Wallet or Search Handle"};
pub static INVALID_WALLET_CREATION: Error = Error{code_num: 1058, message: "Error Creating a wallet"};
pub static INVALID_POOL_NAME: Error = Error{code_num: 1059, message: "Pool Name in config was invalid"};
pub static CANNOT_DELETE_CONNECTION: Error = Error{code_num: 1060, message: "Cannot Delete Connection. Check status of connection is appropriate to be deleted from agency."};
pub static CREATE_CONNECTION_ERROR: Error = Error{code_num:1061, message: "Could not create connection"};
pub static INVALID_WALLET_SETUP: Error = Error{code_num:1062, message: "Invalid wallet keys...have you provisioned correctly?"};
pub static COMMON_ERROR: Error = Error{ code_num: 1063, message: "Common Error"};
pub static INSUFFICIENT_TOKEN_AMOUNT: Error = Error{code_num: 1064, message: "Insufficient amount of tokens to process request"};
pub static UNKNOWN_TXN_TYPE: Error = Error{code_num: 1065, message: "Unknown ledger transaction type"};
pub static INVALID_PAYMENT_ADDRESS: Error = Error{code_num: 1066, message: "Invalid payment address"};
pub static INVALID_LIBINDY_PARAM: Error = Error{code_num: 1067, message: "Parameter passed to libindy was invalid"};
pub static INVALID_PAYMENT: Error = Error{code_num: 1068, message: "Invalid Payment Details"};
pub static MISSING_WALLET_KEY: Error = Error{ code_num: 1069, message: "Configuration is missing wallet key"};
pub static OBJECT_CACHE_ERROR: Error = Error{ code_num: 1070, message: "Object cache error"};
pub static NO_PAYMENT_INFORMATION: Error = Error { code_num: 1071, message: "No payment information associated with object"};
pub static DUPLICATE_WALLET_RECORD: Error = Error{ code_num: 1072, message: "Record already exists in the wallet"};
pub static WALLET_RECORD_NOT_FOUND: Error = Error{ code_num: 1073, message: "Wallet record not found"};
pub static IOERROR: Error = Error { code_num: 1074, message: "IO Error, possibly creating a backup wallet"};
pub static INVALID_WALLET_STORAGE_PARAMETER: Error = Error { code_num: 1075, message: "Wallet Storage Parameter Either Malformed or Missing"};
pub static MISSING_WALLET_NAME: Error = Error { code_num: 1076, message: "Missing wallet name in config"};
pub static MISSING_EXPORTED_WALLET_PATH: Error = Error { code_num: 1077, message: "Missing exported wallet path in config"};
pub static MISSING_BACKUP_KEY: Error = Error { code_num: 1078, message: "Missing exported backup key in config"};
pub static WALLET_NOT_FOUND: Error = Error { code_num: 1079, message: "Wallet Not Found"};
pub static LIBINDY_INVALID_STRUCTURE: Error = Error { code_num: 1080, message: "Object (json, config, key, credential and etc...) passed to libindy has invalid structure"};
pub static INVALID_STATE: Error = Error { code_num: 1081, message: "Object is in invalid state for requested operation"};
pub static INVALID_LEDGER_RESPONSE: Error = Error {code_num: 1082, message: "Invalid response from ledger for paid transaction"};
pub static DID_ALREADY_EXISTS_IN_WALLET: Error = Error { code_num: 1083, message: "Attempted to add a DID to wallet when that DID already exists in wallet" };
pub static DUPLICATE_MASTER_SECRET: Error = Error { code_num: 1084, message: "Attempted to add a Master Secret that already existed in wallet"};
pub static THREAD_ERROR: Error = Error{ code_num: 1085, message: "Unable to create thread"};
pub static INVALID_PROOF_REQUEST: Error = Error{ code_num: 1086, message: "Proof Request Passed into Libindy Call Was Invalid"};
pub static MISSING_PAYMENT_METHOD: Error = Error{ code_num: 1087, message: "Configuration is missing the Payment Method parameter"};
pub static DUPLICATE_SCHEMA: Error = Error{ code_num: 1088, message: "Duplicate Schema: Ledger Already Contains Schema For Given DID, Version, and Name Combination"};
pub static UKNOWN_LIBINDY_TRANSACTION_REJECTION: Error = Error{ code_num: 1089, message: "Unknown Libindy Rejection"};
pub static LOGGING_ERROR: Error = Error{ code_num: 1090, message: "Logging Error" };
pub static INVALID_REVOCATION_DETAILS: Error = Error{ code_num: 1091, message: "Invalid Revocation Details"};
pub static INVALID_REV_ENTRY: Error = Error{ code_num: 1092, message: "Unable to Update Revocation Delta On Ledger"};
pub static INVALID_REVOCATION_TIMESTAMP: Error = Error{ code_num: 1093, message: "Invalid Credential Revocation timestamp"};
pub static UNKNOWN_SCHEMA_REJECTION: Error = Error{ code_num: 1094, message: "Unknown Rejection of Schema Creation, refer to libindy documentation"};
pub static INVALID_REV_REG_DEF_CREATION: Error = Error{ code_num: 1095, message: "Failed to create Revocation Registration Definition"};