fix(client): cyclic dependency server <-> ws

This commit is contained in:
Elian Doran 2025-06-20 18:32:20 +03:00
parent 3190aa6fe6
commit ae1a4fbbf6
No known key found for this signature in database

View File

@ -1,6 +1,5 @@
import utils, { isShare } from "./utils.js"; import utils, { isShare } from "./utils.js";
import ValidationError from "./validation_error.js"; import ValidationError from "./validation_error.js";
import { throwError } from "./ws.js";
type Headers = Record<string, string | null | undefined>; type Headers = Record<string, string | null | undefined>;
@ -277,6 +276,7 @@ async function reportError(method: string, url: string, statusCode: number, resp
} else { } else {
const title = `${statusCode} ${method} ${url}`; const title = `${statusCode} ${method} ${url}`;
toastService.showErrorTitleAndMessage(title, messageStr); toastService.showErrorTitleAndMessage(title, messageStr);
const { throwError } = await import("./ws.js");
throwError(`${title} - ${message}`); throwError(`${title} - ${message}`);
} }
} }