From ed649403902b055935308ee7a244e2d3ba081301 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Thu, 25 Apr 2019 18:27:23 +0200 Subject: [PATCH] IDENTITY/REST: gracefully return if no identities found --- src/identity/plugin_rest_identity.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c index 3bfca3121..89f590d3e 100644 --- a/src/identity/plugin_rest_identity.c +++ b/src/identity/plugin_rest_identity.c @@ -490,15 +490,6 @@ ego_get_all (struct GNUNET_REST_RequestHandle *con_handle, json_decref (json_ego); } - if ((size_t) 0 == json_array_size (json_root)) - { - json_decref (json_root); - handle->response_code = MHD_HTTP_NOT_FOUND; - handle->emsg = GNUNET_strdup(GNUNET_REST_IDENTITY_NOT_FOUND); - GNUNET_SCHEDULER_add_now (&do_error, handle); - return; - } - result_str = json_dumps (json_root, 0); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str); resp = GNUNET_REST_create_response (result_str); -- 2.25.1