parameters?: Payload;
};
+let ignoreConnectionErrors: boolean | undefined = undefined;
+
export class DboAction {
private readonly actionName: string;
private readonly className: string;
}
static prepare(actionName: string, className: string): DboAction {
+ if (ignoreConnectionErrors === undefined) {
+ ignoreConnectionErrors = false;
+
+ window.addEventListener("beforeunload", () => {
+ ignoreConnectionErrors = true;
+ });
+ }
+
return new DboAction(actionName, className);
}
if (error instanceof ApiError) {
throw error;
} else {
- // Re-package the error for use in our global "unhandledrejection" handler.
- throw new ConnectionError(error);
+ if (!ignoreConnectionErrors) {
+ // Re-package the error for use in our global "unhandledrejection" handler.
+ throw new ConnectionError(error);
+ }
}
} finally {
if (showLoadingIndicator) {
exports.DboAction = void 0;
AjaxStatus = tslib_1.__importStar(AjaxStatus);
Core = tslib_1.__importStar(Core);
+ let ignoreConnectionErrors = undefined;
class DboAction {
constructor(actionName, className) {
this._objectIDs = [];
this.className = className;
}
static prepare(actionName, className) {
+ if (ignoreConnectionErrors === undefined) {
+ ignoreConnectionErrors = false;
+ window.addEventListener("beforeunload", () => {
+ ignoreConnectionErrors = true;
+ });
+ }
return new DboAction(actionName, className);
}
getAbortController() {
throw error;
}
else {
- // Re-package the error for use in our global "unhandledrejection" handler.
- throw new Error_1.ConnectionError(error);
+ if (!ignoreConnectionErrors) {
+ // Re-package the error for use in our global "unhandledrejection" handler.
+ throw new Error_1.ConnectionError(error);
+ }
}
}
finally {