Come-from-Beyond (OP)
Legendary
Offline
Activity: 2142
Merit: 1009
Newbie
|
|
September 24, 2013, 08:35:09 AM |
|
I noticed bitcoind loves to respond with HTTP 500 error. I use "gettransaction" via JSON-RPC, it works only for transactions in my own wallet. Bitcoind could return "HTTP 200: I don't give info about someone else transactions" at least.
Even RTFM won't work coz there is no such a thing...
|
|
|
|
|
|
|
|
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
|
Foxpup
Legendary
Offline
Activity: 4354
Merit: 3044
Vile Vixen and Miss Bitcointalk 2021-2023
|
|
September 24, 2013, 10:05:58 AM |
|
Bitcoind could return "HTTP 200: I don't give info about someone else transactions" at least.
No, it couldn't. HTTP 200 means "Your request is valid and I was able to process it correctly, so here's the data you asked for." HTTP 500 is the correct response when the server is unable to carry out your request. What do you expect it to do? Fail to carry out the request and then not give an error?
|
Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
|
|
|
Come-from-Beyond (OP)
Legendary
Offline
Activity: 2142
Merit: 1009
Newbie
|
|
September 24, 2013, 10:20:46 AM |
|
Bitcoind could return "HTTP 200: I don't give info about someone else transactions" at least.
No, it couldn't. HTTP 200 means "Your request is valid and I was able to process it correctly, so here's the data you asked for." HTTP 500 is the correct response when the server is unable to carry out your request. What do you expect it to do? Fail to carry out the request and then not give an error? Ok, but it could attach a meaningful description to the 500 response then.
|
|
|
|
davout
Legendary
Offline
Activity: 1372
Merit: 1007
1davout
|
|
September 24, 2013, 10:23:53 AM |
|
What do you expect it to do?
HTTP 422.
|
|
|
|
dserrano5
Legendary
Offline
Activity: 1974
Merit: 1029
|
|
September 24, 2013, 02:11:53 PM |
|
There are several 4xx codes that would fit (beginning with the good old 404) but in any case a 5xx isn't appropriate here, in my opinion.
|
|
|
|
DoRob
Member
Offline
Activity: 70
Merit: 10
|
|
September 24, 2013, 02:12:50 PM |
|
Error 500 = Internal Server Error
|
1DoRobFUcdcsnS4cDAPsGkqAGiWzacQ94p
|
|
|
davout
Legendary
Offline
Activity: 1372
Merit: 1007
1davout
|
|
September 24, 2013, 02:13:55 PM |
|
There are several 4xx codes that would fit (beginning with the good old 404) but in any case a 5xx isn't appropriate here, in my opinion.
No, 404 is appropriate if the transaction isn't found, as in it does not exist in the blockchain. 422 means "I understand your request, it is legal, but I can not process it for whatever reason". 500 is definitely wrong though, there is no internal error happening, as in "unexpected error".
|
|
|
|
dserrano5
Legendary
Offline
Activity: 1974
Merit: 1029
|
|
September 24, 2013, 02:33:04 PM |
|
There are several 4xx codes that would fit (beginning with the good old 404) but in any case a 5xx isn't appropriate here, in my opinion.
No, 404 is appropriate if the transaction isn't found, as in it does not exist in the blockchain. 404 means "Not found here" not "Doesn't exist". A given document may exist but can't be found in the local server, thus 404.
|
|
|
|
davout
Legendary
Offline
Activity: 1372
Merit: 1007
1davout
|
|
September 24, 2013, 02:55:32 PM |
|
There are several 4xx codes that would fit (beginning with the good old 404) but in any case a 5xx isn't appropriate here, in my opinion.
No, 404 is appropriate if the transaction isn't found, as in it does not exist in the blockchain. 404 means "Not found here" not "Doesn't exist". A given document may exist but can't be found in the local server, thus 404. In this particular context the transaction exists in the DB, it will be properly returned by a getrawtransaction even if it is not a wallet transaction, 404 is not the best return code for this particular context. 404 might be appropriate if the method was named getwallettransaction, not gettransaction OR if the transaction couldn't be found in the general transactions DB.
|
|
|
|
Come-from-Beyond (OP)
Legendary
Offline
Activity: 2142
Merit: 1009
Newbie
|
|
September 24, 2013, 04:02:27 PM |
|
Guys, the number doesn't matter. I need a description of an error, so I don't need to guess what's happened.
|
|
|
|
|