← Back to the archive
Bitcoin.onl > Archive > Bitcoin Forum > Re: HTTP status codes from the JSON-RPC api
AuthorTopic: Re: HTTP status codes from the JSON-RPC api
satoshiFounderSr. Member★★★★
Re: HTTP status codes from the JSON-RPC api
« on: September 06, 2010, 09:21:21 PM UTC »

This is in SVN rev 147.

This is more standard, and although json-rpc 1.0 didn't specify the format of error objects, it did specify that they would be objects not strings or other values, so we needed to change this to be correct.  The code/message members have become standard in later json-rpc specs.

If you have code that checks the error and expects a string, you'll need to change it.  When there is an error, the error member is now an object not a string.

Also in SVN rev 147:
- The command line json-rpc returns the error code as its exit code.  Exit codes can only be 0-255 on unix, so it's abs(code)%256.
- The "backupwallet <destination>" command that was discussed in another thread.  It locks the wallet and copies it, so you can be sure you get a correct copy.

Satoshi designed Bitcoin so you can hold it yourself. Start here →

KEEP THE ARCHIVE ONLINE

Tip in sats.

Bitcoin.onl is free to read. If the archive is useful to you, a tip helps keep it online. Thanks to readers who keep this online.

Lightning (preferred)faramber539@walletofsatoshi.com
On-chainbc1p7dk9n0uv9ryuv73a578zglgq6f2ml0sz9xgy9du9ms9z89evtuts7py4ak
© Bitcoin.onl · Home · Is quantum a threat? · Keep the archive online · Follow us on Bluesky and Nostr