feat(chat): sync multi-role backend APIs
This commit is contained in:
@@ -5,6 +5,7 @@ import { Logger } from "@/utils/logger";
|
||||
import { Result } from "@/utils/result";
|
||||
import { todayString } from "@/utils/date";
|
||||
import { isAbortError } from "@/utils/abort";
|
||||
import { getCharacterErrorCode } from "@/data/services/api";
|
||||
|
||||
import { CHAT_HISTORY_LIMIT } from "./helper/history";
|
||||
import { localMessagesToUi } from "./helper/message-mappers";
|
||||
@@ -94,6 +95,7 @@ export async function syncNetworkHistory(
|
||||
);
|
||||
if (Result.isErr(networkResult)) {
|
||||
if (isAbortError(networkResult.error)) throw networkResult.error;
|
||||
if (getCharacterErrorCode(networkResult.error)) throw networkResult.error;
|
||||
log.error("[chat-machine] loadHistory NETWORK FAILED", {
|
||||
error: networkResult.error,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user