fix: silence usage indicator errors

pull/5330/head
Ramires Viana 2025-07-25 22:08:30 -03:00
parent 07dfdce8e4
commit 4b498cc597
1 changed files with 2 additions and 7 deletions

View File

@ -132,7 +132,6 @@ import {
import { files as api } from "@/api"; import { files as api } from "@/api";
import ProgressBar from "@/components/ProgressBar.vue"; import ProgressBar from "@/components/ProgressBar.vue";
import prettyBytes from "pretty-bytes"; import prettyBytes from "pretty-bytes";
import { StatusError } from "@/api/utils.js";
const USAGE_DEFAULT = { used: "0 B", total: "0 B", usedPercentage: 0 }; const USAGE_DEFAULT = { used: "0 B", total: "0 B", usedPercentage: 0 };
@ -181,13 +180,9 @@ export default {
total: prettyBytes(usage.total, { binary: true }), total: prettyBytes(usage.total, { binary: true }),
usedPercentage: Math.round((usage.used / usage.total) * 100), usedPercentage: Math.round((usage.used / usage.total) * 100),
}; };
} catch (error) { } finally {
if (error instanceof StatusError && error.is_canceled) {
return;
}
this.$showError(error);
}
return Object.assign(this.usage, usageStats); return Object.assign(this.usage, usageStats);
}
}, },
toRoot() { toRoot() {
this.$router.push({ path: "/files" }); this.$router.push({ path: "/files" });