From c85c7f48e8f29923038d4c90cc1a6f9b8bcd7673 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Fri, 9 Oct 2026 18:23:52 +0200 Subject: feat(node): refuse an upload on a full disk with a stated reason Nothing on the upload path knew about ENOSPC: a write that found no room raised out of the handler, the catch-all answered "Request failed", and the .part stayed behind holding the space that had run out. The node now refuses with `disk_full` at chunk 0 when the announced size would leave less than 1 GiB free, and at any write that fails with ENOSPC/EDQUOT, dropping the partial. The client carries the code on the error and the transfers panel says "The node's disk is full" in every catalogue. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/src/meshbay_hub/static/transfers.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/transfers.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transfers.js b/packages/meshbay-hub/src/meshbay_hub/static/transfers.js index 7036c4f..b54f1ac 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/transfers.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/transfers.js @@ -73,6 +73,7 @@ export class TransferStore { queuedByOwnLimit: Boolean( it.lease && it.lease.cap && it.lease.used >= it.lease.cap), error: it.error || '', + errorCode: it.errorCode || '', note: it.note || '', speed: this._speed(it), // The ETA is drawn only once the window holds a few seconds of real @@ -184,9 +185,10 @@ export class TransferStore { this._emit(); }; - const finish = (status, error = '') => { + const finish = (status, error = '', errorCode = '') => { item.status = status; item.error = error; + item.errorCode = errorCode; this._emit(); this._maybeRelease(item.transport); }; @@ -284,7 +286,7 @@ export class TransferStore { }) .catch(err => { if (item.signal.aborted || err.name === 'AbortError') finish('cancelled'); - else finish('failed', err.message || String(err)); + else finish('failed', err.message || String(err), err.code || ''); }) .finally(finished); -- cgit v1.2.3