0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-21 00:52:43 -05:00

chore(server): Improve moveAsset log (#2878)

* chore(server): Improve moveAsset log

* Update storage-template.service.ts
This commit is contained in:
Alex 2023-06-20 16:24:47 -05:00 committed by GitHub
parent 1b15b5414c
commit 6baeca654b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,7 +96,10 @@ export class StorageTemplateService {
asset.originalPath = destination;
asset.sidecarPath = sidecarDestination || null;
} catch (error: any) {
this.logger.warn('Unable to save new originalPath to database, undoing move', error?.stack);
this.logger.warn(
`Unable to save new originalPath to database, undoing move for path ${asset.originalPath} - filename ${asset.originalFileName} - id ${asset.id}`,
error?.stack,
);
// Either sidecar move failed or the save failed. Eithr way, move media back
await this.storageRepository.moveFile(destination, source);