Replies: 5 comments 2 replies
-
@jardicc unfortunately I think without the hook being implemented we can't do much to catch unhandled errors automatically. In addition, with For now I recommend just manually wrapping code and calling Sentry explicitly, that will at least give you some coverage. Note: There is an extremely hacky approach for this, which is to patch the global Promise object and hook into |
Beta Was this translation helpful? Give feedback.
-
Thanks for advice. I will try lobbying in Adobe for adding (for reference: https://forums.creativeclouddeveloper.com/t/errors-not-shown-how-to-workaround-non-existent-onunhandledrejection/7967/4 ) |
Beta Was this translation helpful? Give feedback.
-
@AbhiPrasad would you have any hints on how to do the |
Beta Was this translation helpful? Give feedback.
-
Thanks! I will experiment with it. Meanwhile I found: https://github.com/rtsao/browser-unhandled-rejection |
Beta Was this translation helpful? Give feedback.
-
It is not frozen and the check returns |
Beta Was this translation helpful? Give feedback.
-
Adobe has UXP technology for its plugins. It looks like a web browser but it is not. It looks like NodeJS but it not either. But it includes whole V8 engine.
I can add Sentry for Browser. I can also explicitly send an error calling sentry function and it works. But it does not catch unhadled rejections automatically. Because
onunhandledrejection
is not implemented in UXP.Sentry listents to that event but UXP will never fire it. Also unhandled rejection is never logged into console by default. I have to use try/catch and rethrow it myslef.
Is there some a way to workaround it? I was thinking maybe to intercept Error constructor or something like that but it did not work. And
Error.captureStackTrace
is called in so many non-error cases that I cannot use it.I can wrap top level code into try/catch call Sentry explicitly and it works for awaited child functions but if some nested promise is not awaited then it is not catched and error not reported.
Beta Was this translation helpful? Give feedback.
All reactions