are you testing deepstream-server? the related code are opensource. you can modify to customize.
if within_multiurisrcbin is set 0. please add the following code in s_stream_callback_impl of rest_server_callbacks.cpp, which is in the same directory.
g_print ("No record found; Failed to remove sensor id=[%s] uri=[%s]\n",
stream_info->value_camera_id.c_str (),
stream_info->value_camera_url.c_str ());
//below is new code
stream_info->status = STREAM_REMOVE_FAIL;
stream_info->stream_log = "STREAM_REMOVE_FAIL, No record found";
stream_info->err_info.code = StatusNotAcceptable;
then rebuild deepstream-server-app.
2. if within_multiurisrcbin is set 1, please add the code above in s_stream_api_impl of opt\nvidia\deepstream\deepstream\sources\gst-plugins\gst-nvmultiurisrcbin\gstdsnvmultiurisrcbin.cpp. then rebuild libnvdsgst_nvmultiurisrcbin.so, then replace /opt/nvidia/deepstream/deepstream/lib/gst-plugins/libnvdsgst_nvmultiurisrcbin.so with the new so.