You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Most of the hook invocations are not guarded with .catch() or try-await-catch, so promise rejections are unhandled. This causes a server crash by default.
Steps to reproduce the bug
Steps to reproduce the behavior:
Return a rejected promise from a hook e.g. onStoreDocument
Server process crashes due to unhandled rejection
Expected behavior
Errors should be handled appropriately.
The text was updated successfully, but these errors were encountered:
If your error does not have a message field, it will be 'handled'. Of course, then you're left with an unsaved document and need to solve that somehow.
I'm not posting to discount the issue, just highlight something you might be able to use in the meantime. I agree there should be some documented way for hooks to fail without crashing. And, for onStoreDocument in particular, maybe there is some API / options for how to handle when a document fails to save (e.g. automatically scheduling a retry later).
Description
Most of the hook invocations are not guarded with
.catch()
ortry
-await
-catch
, so promise rejections are unhandled. This causes a server crash by default.Steps to reproduce the bug
Steps to reproduce the behavior:
onStoreDocument
Expected behavior
Errors should be handled appropriately.
The text was updated successfully, but these errors were encountered: