diff options
Diffstat (limited to 'src/backend/taler-merchant-httpd_pay.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_pay.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c index e6265ba1..3e11c6e9 100644 --- a/src/backend/taler-merchant-httpd_pay.c +++ b/src/backend/taler-merchant-httpd_pay.c @@ -918,8 +918,18 @@ MH_handler_pay (struct TMH_RequestHandler *rh, return (GNUNET_NO == res) ? MHD_YES : MHD_NO; } pc->mi = get_instance (root); - GNUNET_assert (NULL != - (pc->mi = get_instance (root))); + + if (NULL == pc->mi) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Not able to find the specified receiver\n"); + json_decref (root); + return TMH_RESPONSE_reply_external_error (connection, + "Unknown receiver given"); + } + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "The receiver for this deposit is '%s'\n", + pc->mi->id); pc->chosen_exchange = GNUNET_strdup (chosen_exchange); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Parsed JSON for /pay.\n"); |