# Gavin Andresen # 2011-07-31 12:57:46 # https://bitcointalk.org/index.php?topic=33122.msg415049#msg415049 I followed the JSON-RPC-2.0 spec for errors, as described here: @p{brk} @s{(link)} @p{brk} (see section 5.1) @p{par} ... with several bitcoin-specific additional error codes that I'd have to look at the source code to remember. @p{par} I thought I'd documented the additional bitcoin error codes, but maybe that information got lost in the wiki move that happened last year or maybe I'm mis-remembering. Quick grep through rpc.cpp gives: @p{par} Code: (-10, "Bitcoin is downloading blocks..."); @p{brk} (-11, "Invalid account name"); @p{brk} (-12, "Error: Keypool ran out, please call keypoolrefill first"); @p{brk} (-12, "Error: Keypool ran out, please call topupkeypool first"); @p{brk} (-13, "Error: Please enter the wallet passphrase with walletpassphrase first."); @p{brk} (-14, "Error: The wallet passphrase entered was incorrect."); @p{brk} (-15, "Error: running with an encrypted wallet, but encryptwallet was called."); @p{brk} (-15, "Error: running with an unencrypted wallet, but walletlock was called."); @p{brk} (-15, "Error: running with an unencrypted wallet, but walletpassphrase was called."); @p{brk} (-15, "Error: running with an unencrypted wallet, but walletpassphrasechange was called."); @p{brk} (-16, "Error: Failed to encrypt the wallet."); @p{brk} (-17, "Error: Wallet is already unlocked."); @p{brk} (-2, string("Safe mode: ") + strWarning); @p{brk} (-3, "Invalid amount"); @p{brk} (-32600, "Method must be a string"); @p{brk} (-32600, "Missing method"); @p{brk} (-32600, "Params must be an array"); @p{brk} (-32601, "Method not found"); @p{brk} (-32700, "Parse error"); @p{brk} (-4, "Error refreshing keypool."); @p{brk} (-4, "Transaction commit failed"); @p{brk} (-4, "Transaction creation failed"); @p{brk} (-5, "Invalid bitcoin address"); @p{brk} (-5, "Invalid or non-wallet transaction id"); @p{brk} (-5, string("Invalid bitcoin address:")+s.name_); @p{brk} (-6, "Account has insufficient funds"); @p{brk} (-6, "Insufficient funds"); @p{brk} (-7, "Out of memory"); @p{brk} (-8, "Invalid parameter"); @p{brk} (-8, string("Invalid parameter, duplicated address: ")+s.name_); @p{brk} (-9, "Bitcoin is not connected!"); @p{brk}