mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-04-17 21:37:06 -04:00
fix: add warning details when backup is stopped by user
This commit is contained in:
@@ -235,7 +235,7 @@ describe("stop backup", () => {
|
||||
// assert
|
||||
const updatedSchedule = await backupsService.getScheduleById(schedule.id);
|
||||
expect(updatedSchedule.lastBackupStatus).toBe("warning");
|
||||
expect(updatedSchedule.lastBackupError).toBe("Backup was stopped by user");
|
||||
expect(updatedSchedule.lastBackupError).toBe("Backup was stopped by the user");
|
||||
});
|
||||
|
||||
test("should throw ConflictError when trying to stop non-running backup", async () => {
|
||||
|
||||
@@ -324,7 +324,7 @@ const stopBackup = async (scheduleId: number) => {
|
||||
} finally {
|
||||
await scheduleQueries.updateStatus(scheduleId, organizationId, {
|
||||
lastBackupStatus: "warning",
|
||||
lastBackupError: "Backup was stopped by user",
|
||||
lastBackupError: "Backup was stopped by the user",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -170,7 +170,7 @@ export const backup = async (
|
||||
|
||||
if (options.signal?.aborted) {
|
||||
logger.warn("Restic backup was aborted by signal.");
|
||||
return { result: null, exitCode: res.exitCode, warningDetails: null };
|
||||
return { result: null, exitCode: res.exitCode, warningDetails: "Backup was stopped by the user" };
|
||||
}
|
||||
|
||||
if (res.exitCode === 3) {
|
||||
|
||||
Reference in New Issue
Block a user