Check if wallet is encrypted or not through RPC API How can one check if their wallet is encrypted through the RPC API without receiving an exception?
I went through the Original Bitcoin client API calls list but didn't find any command that could facilitate this functionality without resulting into an error in the response.
Any ideas or workarounds?
From the source code (rpcprotocol.h):

RPC_WALLET_ERROR                = -4,  // Unspecified problem with wallet (key not found etc.)


So you could check for a JSON-RPC return value of -4, or if you want to be absolutely sure, you can use:

bitcoind [...] -help | grep walletlock


The walletlock RPC command becomes only available (in the -help list) after encrypting your wallet.