Shun Miyazawa %!s(int64=3) %!d(string=hai) anos
pai
achega
6bafba82dc
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      packages/app/src/server/routes/apiv3/page.js

+ 3 - 1
packages/app/src/server/routes/apiv3/page.js

@@ -474,7 +474,9 @@ module.exports = (crowi) => {
 
     try {
       const fromPage = await Page.findByPath(fromPath);
-      if (fromPage == null) throw new Error('fromPage is Null');
+      if (fromPage == null) {
+        return res.apiv3Err(new ErrorV3('fromPage is Null'), 400);
+      }
 
       const fromPageDescendants = await Page.findManageableListWithDescendants(fromPage, req.user);