Currently almost all commands just give a -1 error code in all errors. However this is not really particularly useful programmatically: it would be better for progammatic access to be able to determine what the exact error is without having to parse the error message (which is in fact the intent of the error code).
So I want to propose that we change command_fail to accept a proper code argument and make an effort to provide error codes for all error types!
IF we decide to go this route (this issue is a question) then w should probably schedule this for 0.6 also, as we would like to present a reasonably stable JSON-RPC interface.
Inspired-by: @wythe #1463
Currently almost all commands just give a
-1error code in all errors. However this is not really particularly useful programmatically: it would be better for progammatic access to be able to determine what the exact error is without having to parse the error message (which is in fact the intent of the error code).So I want to propose that we change
command_failto accept a proper code argument and make an effort to provide error codes for all error types!IF we decide to go this route (this issue is a
question) then w should probably schedule this for 0.6 also, as we would like to present a reasonably stable JSON-RPC interface.Inspired-by: @wythe #1463