nicer error reporting
This commit is contained in:
parent
22eae129a9
commit
0f5ef01dd3
@ -174,7 +174,7 @@ handle_history_finished (void *cls,
|
|||||||
switch (response_code)
|
switch (response_code)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
ec = TALER_EC_INTERNAL_INVARIANT_FAILURE;
|
ec = TALER_EC_BANK_HISTORY_HTTP_FAILURE;
|
||||||
break;
|
break;
|
||||||
case MHD_HTTP_OK:
|
case MHD_HTTP_OK:
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
|
@ -1515,6 +1515,13 @@ enum TALER_ErrorCode
|
|||||||
*/
|
*/
|
||||||
TALER_EC_BANK_HISTORY_NOT_AUHTORIZED = 4151,
|
TALER_EC_BANK_HISTORY_NOT_AUHTORIZED = 4151,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The bank library had trouble obtaining a valid
|
||||||
|
* HTTP response.
|
||||||
|
* Returned with a status code of 0.
|
||||||
|
*/
|
||||||
|
TALER_EC_BANK_HISTORY_HTTP_FAILURE = 4152,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The bank could not find the wire transfer that was supposed to
|
* The bank could not find the wire transfer that was supposed to
|
||||||
* be rejected.
|
* be rejected.
|
||||||
|
@ -891,9 +891,10 @@ bhist_cb (void *cls,
|
|||||||
GNUNET_free (whh);
|
GNUNET_free (whh);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* FIXME: consider modifying API to pass more specific error code(s)
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
back to the application. */
|
"Bank failed with HTTP status %u (EC: %u)\n",
|
||||||
GNUNET_break (0);
|
http_status,
|
||||||
|
ec);
|
||||||
if (NULL != whh->hres_cb)
|
if (NULL != whh->hres_cb)
|
||||||
(void) whh->hres_cb (whh->hres_cb_cls,
|
(void) whh->hres_cb (whh->hres_cb_cls,
|
||||||
ec,
|
ec,
|
||||||
|
Loading…
Reference in New Issue
Block a user