mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-04 22:06:06 +02:00
fix error text
This commit is contained in:
@@ -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], {
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user