mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
feat: fully qualified path in error msg (#19674)
* feat: fully qualified path in error msg * import style
This commit is contained in:
parent
f2f3db3a79
commit
ca78bc91b6
@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { join } from 'node:path';
|
import { join, resolve } from 'node:path';
|
||||||
import { StorageCore } from 'src/cores/storage.core';
|
import { StorageCore } from 'src/cores/storage.core';
|
||||||
import { OnEvent, OnJob } from 'src/decorators';
|
import { OnEvent, OnJob } from 'src/decorators';
|
||||||
import { DatabaseLock, JobName, JobStatus, QueueName, StorageFolder, SystemMetadataKey } from 'src/enum';
|
import { DatabaseLock, JobName, JobStatus, QueueName, StorageFolder, SystemMetadataKey } from 'src/enum';
|
||||||
@ -87,8 +87,9 @@ export class StorageService extends BaseService {
|
|||||||
try {
|
try {
|
||||||
await this.storageRepository.readFile(internalPath);
|
await this.storageRepository.readFile(internalPath);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error(`Failed to read ${internalPath}: ${error}`);
|
const fullyQualifiedPath = resolve(process.cwd(), internalPath);
|
||||||
throw new ImmichStartupError(`Failed to read "${externalPath} - ${docsMessage}"`);
|
this.logger.error(`Failed to read ${fullyQualifiedPath} (${internalPath}): ${error}`);
|
||||||
|
throw new ImmichStartupError(`Failed to read: "${externalPath} (${fullyQualifiedPath}) - ${docsMessage}"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user