mirror of
https://github.com/Mintplex-Labs/bree.git
synced 2026-07-21 00:45:22 -04:00
fix: output err and message if available
This commit is contained in:
@@ -408,7 +408,11 @@ class Bree {
|
||||
getWorkerMetadata(name, meta = {}) {
|
||||
const job = this.config.jobs.find((j) => j.name === name);
|
||||
if (!job) throw new Error(`Job "${name}" does not exist`);
|
||||
if (!this.config.outputWorkerMetadata && !job.outputWorkerMetadata) return;
|
||||
if (!this.config.outputWorkerMetadata && !job.outputWorkerMetadata)
|
||||
return meta &&
|
||||
(typeof meta.err !== 'undefined' || typeof meta.message !== 'undefined')
|
||||
? meta
|
||||
: undefined;
|
||||
return this.workers[name]
|
||||
? {
|
||||
...meta,
|
||||
|
||||
Reference in New Issue
Block a user