in reply to Re: JSON / Bitcoind API 500 internal error
in thread JSON / Bitcoind API 500 internal error

Do you know the proper way of cheking for errors? The way i'm doing $error = $call->{'error'}; is returning null. The Apache log does not have any related error.
  • Comment on Re^2: JSON / Bitcoind API 500 internal error

Replies are listed 'Best First'.
Re^3: JSON / Bitcoind API 500 internal error
by runrig (Abbot) on Mar 04, 2014 at 19:03 UTC
    Looking at the docs, it looks like the proper way would be to call $api->error() if $api->call(...) returns undef.
      Thanks, you are right about error cheking, but it is returning the same error as json status line: HTTP 500 Internal Server Error

        Time to debug the script being called.

Re^3: JSON / Bitcoind API 500 internal error
by marto (Cardinal) on Mar 04, 2014 at 19:24 UTC

    If the apache error log has nothing consider checking that your configuration is set to log errors correctly. The module documentation has example usage for the error method.

      I manually debuged and could make sure that the problem is here:

      &ReadParse(*data);
      $btc = $data{"amount"}; #the value being parsed is 0.01 or any other valid btc value.

      The above does not work as a param for the bitcoin api, but it works:

      $btc = 0.01;