mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
fix(client): cyclic dependency server <-> ws
This commit is contained in:
parent
3190aa6fe6
commit
ae1a4fbbf6
@ -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}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user