fix error text

This commit is contained in:
pa
2026-03-13 00:35:31 +09:00
parent fbe290b788
commit 73493cb0aa
4 changed files with 8 additions and 12 deletions
+2 -5
View File
@@ -9,7 +9,6 @@ import {
} from '../stores';
import { getCurrentUser } from '../coordinators/userCoordinator';
import { AppDebug, isApiLogSuppressed, logWebRequest } from './appConfig.js';
import { escapeTag } from '../shared/utils';
import { i18n } from '../plugins/i18n';
import { statusCodes } from '../shared/constants/api.js';
import { watchState } from './watchState';
@@ -194,9 +193,7 @@ export function request(endpoint, options) {
text = data.OK;
}
if (text) {
toast.success(
options.customMsg ? options.customMsg : escapeTag(text)
);
toast.success(options.customMsg ? options.customMsg : text);
}
return data;
}
@@ -355,7 +352,7 @@ export function $throw(code, error, endpoint) {
) {
message[1] = `${t('api.error.message.error_message')}: "${t('api.error.message.unavailable')}"`;
}
const text = message.map((s) => escapeTag(s)).join('\n');
const text = message.join('\n');
if (text.length && !ignoreError) {
toast.error(message[0], {
+2 -2
View File
@@ -23,7 +23,7 @@ import {
handleFriendAdd,
handleFriendDelete
} from '../coordinators/friendRelationshipCoordinator';
import { escapeTag, parseLocation } from '../shared/utils';
import { parseLocation } from '../shared/utils';
import { AppDebug } from './appConfig';
import { groupRequest } from '../api';
import { request } from './request';
@@ -201,7 +201,7 @@ function handlePipeline(args) {
if (AppDebug.errorNoty) {
toast.dismiss(AppDebug.errorNoty);
}
AppDebug.errorNoty = toast.error(escapeTag(`WebSocket Error: ${err}`));
AppDebug.errorNoty = toast.error(`WebSocket Error: ${err}`);
return;
}
if (typeof content === 'undefined') {