LP1855737 Don't send error object across shared worker port
authorBill Erickson <berickxx@gmail.com>
Mon, 9 Dec 2019 16:47:30 +0000 (11:47 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 23 Oct 2020 14:53:16 +0000 (10:53 -0400)
Data must be string-ifiable to pass across a shared web worker message
port.  In Firefox, at least, errors encountered during IndexedDB /
Lovefield operations are not candidates for automatic stringification.
Avoid trying to send the error object back to the caller.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/web/js/ui/default/staff/offline-db-worker.js

index 3239900..3e3780e 100644 (file)
@@ -340,7 +340,6 @@ function dispatchRequest(port, data) {
     function replyError(err) {
         console.error('shared worker replying with error', err);
         data.status = 'ERR';
-        data.error = err;
         port.postMessage(data);
     }