Closed jlaurila closed 6 years ago
Hey @jlaurila,
I'll take a look at it and provide you a sample or bug fix if needed as fast as possible.
Kind Regards, Florian
Hey @jlaurila,
sorry for the delay. I just published v3.6.5, which should allow you to catch errors as you showed in your code snippet. Please give me some feedback, whether it is working for you now.
Kind Regards, Florian
Thank you for the fix. There seems to be some breaking change to sync batch requests. Previously I was able to process the response, but now this line is called and it seems to lose the return value: https://github.com/DigitalFlow/Xrm-WebApi-Client/blob/69a1604ca2aad29229fd12055d751958b02e4979/src/js/WebApiClient.Core.js#L518
Previously this line was inside onload event handler function but now it returns from the SendSync directly and the response object is not returned.
Sorry for the issue, tests were passing. This will get a regression test. In the meantime: Can you try deleting the else condition that you referenced and check, if it behaves correctly?
Hey @jlaurila,
I just released v3.6.6, which contains a bugfix and a regression test for your issue with synchronous batch requests. Please give me some feedback, if your issues are resolved.
Kind Regards, Florian
Hey @jlaurila,
I'll close this. Please reopen if you're still having issues.
Kind Regards, Florian
Hi, I don't seem to be able to catch errors when using synchronous mode. The following code will cause SendSync to throw an error "Uncaught Error: Not Found: Resource not found for the segment ..." but this will not be caught by the catch clause. Tested in Chrome and Firefox.
I'm not a JavaScript guru so sorry if this is a trivial question, but how to catch the error in this case? In async mode the error is caught as expected.