--- a/mod_rest/apidemo.lib.lua Sun Apr 17 12:51:45 2022 +0200
+++ b/mod_rest/apidemo.lib.lua Sun Apr 17 12:52:13 2022 +0200
@@ -11,7 +11,12 @@
});
local index do
- local f = assert(io.open(api_demo.."/index.html"), "'rest_demo_resources' should point to the 'dist' directory");
+ local f, err = io.open(api_demo.."/index.html");
+ if not f then
+ module:log("error", "Could not open resource: %s", err);
+ module:log("error", "'rest_demo_resources' should point to the 'dist' directory");
+ return _M
+ end
index = f:read("*a");
f:close();