Browse Source

fix: include stack traces

nc-fix/error-handling
DarkPhoenix2704 6 months ago
parent
commit
d2295f90e5
  1. 8
      packages/nocodb/src/modules/jobs/redis/jobs-redis.ts
  2. 8
      packages/nocodb/src/redis/pubsub-redis.ts

8
packages/nocodb/src/modules/jobs/redis/jobs-redis.ts

@ -36,7 +36,13 @@ export class JobsRedis extends PubSubRedis {
(await this.primaryCallbacks[command](...args));
}
} catch (error) {
this.logger.error('Error processing message' + error);
this.logger.error({
message: 'Error processing redis pub-sub message',
error: {
message: error?.message,
stack: error?.stack,
},
});
}
};
if (process.env.NC_WORKER_CONTAINER === 'true') {

8
packages/nocodb/src/redis/pubsub-redis.ts

@ -34,7 +34,13 @@ export class PubSubRedis {
await callback(...args);
}
} catch (error) {
PubSubRedis.logger.error('Error processing message' + error);
PubSubRedis.logger.error({
message: 'Error processing redis pub-sub message',
error: {
message: error?.message,
stack: error?.stack,
},
});
}
});

Loading…
Cancel
Save