1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-08 23:07:06 +02: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:
Desmond Cox
2025-02-28 18:50:00 +01:00
committed by GitHub
parent 84cf0d1670
commit 5c0538e52c

View File

@ -195,7 +195,11 @@ export class JobService extends BaseService {
await this.onDone(job);
}
} 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 {
this.telemetryRepository.jobs.addToGauge(queueMetric, -1);
}