mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-13 01:45:23 +02:00
fix: improve error handling during volume restoration process
- Simplified error handling in the volume restoration logic by removing detailed error messages and stack traces. - Updated user feedback to provide clearer instructions when a volume is in use, enhancing the user experience during restoration attempts. - Ensured that the restoration process aborts gracefully with informative messages when prerequisites are not met.
This commit is contained in:
@@ -155,19 +155,9 @@ export const volumeBackupsRouter = createTRPCRouter({
|
||||
emit.next(
|
||||
"🎉 All containers/services have been restarted with the restored volume.",
|
||||
);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
emit.next("");
|
||||
emit.next("❌ Volume restore failed!");
|
||||
emit.next(
|
||||
`💥 Error: ${error instanceof Error ? error.message : "Unknown error"}`,
|
||||
);
|
||||
|
||||
if (error instanceof Error && error.stack) {
|
||||
emit.next("📋 Stack trace:");
|
||||
for (const line of error.stack.split("\n")) {
|
||||
if (line.trim()) emit.next(` ${line}`);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
emit.complete();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user