in reply to JSON / Bitcoind API 500 internal error

Internal server errors occur server side, you should check the appriate server logs which should tell you why. The Finance::Bitcoin::API docs suggest chcking error for error messages which would be worth while.

Replies are listed 'Best First'.
Re^2: JSON / Bitcoind API 500 internal error
by aboboras (Acolyte) on Mar 04, 2014 at 18:40 UTC
    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.
      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

      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;