Browse Source

return tool errors properly

Dax Raad 9 months ago
parent
commit
4132fcc1b2
1 changed files with 6 additions and 1 deletions
  1. 6 1
      js/src/tool/tool.ts

+ 6 - 1
js/src/tool/tool.ts

@@ -48,7 +48,12 @@ export namespace Tool {
           log.error("error", {
           log.error("error", {
             msg: e.toString(),
             msg: e.toString(),
           });
           });
-          return "An error occurred: " + e.toString();
+          return {
+            metadata: {
+              error: true,
+            },
+            output: "An error occurred: " + e.toString(),
+          };
         }
         }
       },
       },
     });
     });