Просмотр исходного кода

fix: revert hook try/catch that surpressed errors

Aiden Cline 2 месяцев назад
Родитель
Сommit
070ced0b3f
1 измененных файлов с 4 добавлено и 8 удалено
  1. 4 8
      packages/opencode/src/plugin/index.ts

+ 4 - 8
packages/opencode/src/plugin/index.ts

@@ -61,14 +61,10 @@ export namespace Plugin {
     for (const hook of await state().then((x) => x.hooks)) {
       const fn = hook[name]
       if (!fn) continue
-      try {
-        // @ts-expect-error if you feel adventurous, please fix the typing, make sure to bump the try-counter if you
-        // give up.
-        // try-counter: 2
-        await fn(input, output)
-      } catch (e) {
-        log.error("failed to trigger hook", { name, error: e })
-      }
+      // @ts-expect-error if you feel adventurous, please fix the typing, make sure to bump the try-counter if you
+      // give up.
+      // try-counter: 2
+      await fn(input, output)
     }
     return output
   }