Electrum Error Message "22" When I try to send BTC from my Electrum wallet address to one of my unused addresses in Electrum, just as a test, it comes up with an error message (U'message':u'TX rejected, U'code':-22).
I'm using electrum-1.6.2 Install version on my Windows 7 64-bit PC.

I changed the Electrum server and then the transmission worked, so I guess it was an error transmitting data to the server.

Can someone confirm that Error "22" refers to a transmission error to the server?
Also, is there a list of error message numbers, so in future I can refer to the list?
I've been reading the source code of Electrum, and it turns out that the reason why you can't find anything about this is that it's not an Electrum error-it's an error generated by the Bitcoin client, and Electrum is just passing it along.

Now, what causes the error?

There are a bunch of ways it can happen (like trying to send a coinbase transaction), but the number one way that this can happen is if you send the same transaction twice. Unfortunatly, the current implementation of sendrawtransaction doesn't really give you any information about why.

(For those that are interested, the relevant error is on line 555 of rpcrawtransaction.cpp.