REST: For list, return the error in JSON

The only way list can fail is if the GetSubTreePaths call fails,
and that will only happen if the path isn't a valid D-Bus object.

In that case, return the standard REST error JSON response for
org.freedesktop.DBus.Error.FileNotFound.

Change-Id: I538d3132552590e51f9ede80762aee00c59cb3e9
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 0ab3908..a142426 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -929,7 +929,8 @@
                std::vector<std::string> &objectPaths) {
             if (ec)
             {
-                res.result(boost::beast::http::status::internal_server_error);
+                setErrorResponse(res, boost::beast::http::status::not_found,
+                                 notFoundDesc, notFoundMsg);
             }
             else
             {