UnhandledRejection not working on awaitRedraw


#1

Please look there: https://snippet.dhtmlx.com/5393uhfu

I have two promises with errors, first is fetch, and second is dhx.awaitRedraw.
I have there onunhandledrejection function too, which works fine for fetch error, but not working for awaitRedraw.
In my application, only one way I see to awaitRedraw error handling is copy catch fragment to all occurencies of awaitRedraw.
Why onunhandlerejection not working for awaitRedraw errors?


#2

I think that problem is with finish method in Deferred function - if state equals to 4 and not exists next tick, then error is silent and will never display to user. Maybe you can add there console.error and onunhandledrejection event firing?


#3

Thank you for your report. The problem is confirmed. We’ll try to find a solution in future updates.