If you enable the automatic crash reporting on Javascript-based applications, the Bugfender SDK will try to catch all errors thrown by your application.
Bugfender can automatically log two types of errors:
User-defined exceptions, when your code or the code you're calling uses
throw
to throw an exception.Unhandled promise rejections, when your code returns a
Promise
andreject()
is called on it, but your application didn't define a callback for that case.
You will get a "crash" with the text "Potentially unhandled promise" when Bugfender detects an unhandled promise rejection.
However, by the nature of how unhandled Promise rejections is processed, it is not possible to know in advance if your application has registered an unhandled exception handler, and it is going to process the rejection via this mechanism. For that reason, the Bugfender SDK monitors the rejection for handling during one millisecond, and will send the "Potentially unhandled promise" crash after that time.
Please note this is "potentially" because if your code handles the rejection after that first one millisecond, Bugfender will already have sent the error message.