refactor: simplify rollback error handling in rollback function

- Removed try-catch block in the rollback function to streamline error handling, allowing for direct propagation of errors from the rollbackApplication call.
- This change enhances code readability and maintains the functionality of the rollback process.
This commit is contained in:
Mauricio Siu
2025-12-02 00:56:27 -06:00
parent fbf840bf6e
commit 18e609313b
@@ -162,7 +162,6 @@ export const rollback = async (rollbackId: string) => {
if (!result.fullContext) { if (!result.fullContext) {
throw new Error("Rollback context not found"); throw new Error("Rollback context not found");
} }
try {
// Use the full context for rollback // Use the full context for rollback
await rollbackApplication( await rollbackApplication(
application.appName, application.appName,
@@ -170,10 +169,6 @@ export const rollback = async (rollbackId: string) => {
application.serverId, application.serverId,
result.fullContext, result.fullContext,
); );
} catch (error) {
console.error(error);
throw new Error("Failed to rollback application");
}
}; };
const rollbackApplication = async ( const rollbackApplication = async (