Bugfender can automatically log two types of errors:
User-defined exceptions, when your code or the code you're calling uses
throwto throw an exception.
Unhandled promise rejections, when your code returns a
reject()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.