Skip to content

Commit 01fe150

Browse files
committed
fix: apply and rollback error handling
1 parent e5cc87d commit 01fe150

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

api/src/unraid-api/unraid-file-modifier/unraid-file-modifier.service.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,8 @@ export class UnraidFileModificationService implements OnModuleInit, OnModuleDest
3232
}
3333
}
3434
async onModuleDestroy() {
35-
try {
36-
this.logger.log('Rolling back all modifications...');
37-
await this.rollbackAll();
38-
} catch (err) {
39-
this.logger.error(`Failed to roll back modifications: ${err}`);
40-
}
35+
this.logger.log('Rolling back all modifications...');
36+
await this.rollbackAll();
4137
}
4238

4339
/**
@@ -90,7 +86,6 @@ export class UnraidFileModificationService implements OnModuleInit, OnModuleDest
9086
} else {
9187
this.logger.error(`Failed to apply modification: ${modification.id}: ${error}`);
9288
}
93-
throw error;
9489
}
9590
}
9691

@@ -120,6 +115,4 @@ export class UnraidFileModificationService implements OnModuleInit, OnModuleDest
120115
}
121116
}
122117
}
123-
124-
125118
}

0 commit comments

Comments
 (0)