mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-20 14:45:42 +02:00
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:
@@ -162,18 +162,13 @@ export const rollback = async (rollbackId: string) => {
|
||||
if (!result.fullContext) {
|
||||
throw new Error("Rollback context not found");
|
||||
}
|
||||
try {
|
||||
// Use the full context for rollback
|
||||
await rollbackApplication(
|
||||
application.appName,
|
||||
result.image || "",
|
||||
application.serverId,
|
||||
result.fullContext,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
throw new Error("Failed to rollback application");
|
||||
}
|
||||
// Use the full context for rollback
|
||||
await rollbackApplication(
|
||||
application.appName,
|
||||
result.image || "",
|
||||
application.serverId,
|
||||
result.fullContext,
|
||||
);
|
||||
};
|
||||
|
||||
const rollbackApplication = async (
|
||||
|
||||
Reference in New Issue
Block a user