mirror of
https://github.com/immich-app/immich.git
synced 2025-03-11 02:23:09 -05:00
fix(server): stringify error log parameter to ensure correct overload (#16422)
* fix(server): stringify error log parameter to ensure correct overload The intended error(message, stack, context) overload is only selected if context is a string. * formatter
This commit is contained in:
parent
84cf0d1670
commit
5c0538e52c
1 changed files with 5 additions and 1 deletions
|
@ -195,7 +195,11 @@ export class JobService extends BaseService {
|
||||||
await this.onDone(job);
|
await this.onDone(job);
|
||||||
}
|
}
|
||||||
} catch (error: Error | any) {
|
} catch (error: Error | any) {
|
||||||
this.logger.error(`Unable to run job handler (${queueName}/${job.name}): ${error}`, error?.stack, job.data);
|
this.logger.error(
|
||||||
|
`Unable to run job handler (${queueName}/${job.name}): ${error}`,
|
||||||
|
error?.stack,
|
||||||
|
JSON.stringify(job.data),
|
||||||
|
);
|
||||||
} finally {
|
} finally {
|
||||||
this.telemetryRepository.jobs.addToGauge(queueMetric, -1);
|
this.telemetryRepository.jobs.addToGauge(queueMetric, -1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue