2

Where can I find the list of all possible sendrawtransaction RPC error codes & messages?

Such as this: {"code":-22,"message":"TX decode failed. Make sure the tx has at least one input."}

Murch
  • 71,155
  • 33
  • 180
  • 600
jiamijiang
  • 105
  • 6

1 Answers1

2

The code for the _rawtransaction RPCs is in /src/rpc/rawtransaction.cpp including your example of the "TX decode failed" error message.

If you do a Ctrl-F or git grep in that file for JSONRPCError you'll see some of the other error messages but that may not be an exhaustive list.

Michael Folkson
  • 14,337
  • 3
  • 11
  • 45