Включить диагностику ошибок браузера

This commit is contained in:
AidarKC
2026-11-16 12:13:42 +03:00
parent 102feccb2e
commit d9fdaf1930
14 changed files with 382 additions and 214 deletions
+3 -18
View File
@@ -3543,26 +3543,11 @@ export class AuthService {
}
async reportClientError(details) {
// Ошибки не запускают переподключение: без открытого WS отчёт не отправляем.
if (this.ws?.ws?.readyState !== WebSocket.OPEN) return false;
try {
const response = await this.ws.request('ClientErrorLog', details || {}, 3000);
return response?.status === 200;
} catch {
return false;
}
}
async reportClientUiError(details = {}) {
try {
const payload = {
source: 'ui_error',
code: 'UI_RUNTIME_ERROR',
...details,
};
const response = await this.sendCallDeliveryReport({
type: 'ui_error',
value: JSON.stringify(payload),
});
return !!response;
return response?.status === 200 && response?.accepted === true;
} catch {
return false;
}