fix(all): Fix user switching on a single chip.

This commit is contained in:
Rodrigo Rodriguez 2023-09-09 14:13:22 -03:00
parent 69e4062146
commit f553260b56

View file

@ -60,6 +60,7 @@ import { RootData } from './RootData.js';
import { GBSSR } from '../packages/core.gbapp/services/GBSSR.js';
import { Mutex } from 'async-mutex';
import { GBVMService } from '../packages/basic.gblib/services/GBVMService.js';
import e from 'express';
/**
* General Bots open-core entry point.
@ -108,6 +109,7 @@ export class GBServer {
// Setups global error handlers.
process.on('unhandledRejection', (err, p) => {
err = err['e'] ? err['e'] : err;
GBLog.error(`UNHANDLED_REJECTION(promises): ${err.toString()} ${err['stack'] ? '\n' + err['stack'] : ''}`);
if (err['response']?.obj?.httpStatusCode === 404) {
GBLog.warn(`Check reverse proxy: ${process.env.BOT_URL} as it seems to be invalid.`);
@ -116,6 +118,7 @@ export class GBServer {
process.on('uncaughtException', (err, p) => {
if (err !== null) {
err = err['e'] ? err['e'] : err;
GBLog.error(`UNCAUGHT_EXCEPTION: ${err.toString()} ${err['stack'] ? '\n' + err['stack'] : ''}`);
} else {
GBLog.error('UNCAUGHT_EXCEPTION: Unknown error (err is null)');