feat: add new ErrNoSpaceLeftOnDevice API error for ENOSPC errors

Add a new non-AWS error ErrNoSpaceLeftOnDevice (HTTP 507 Insufficient
Storage) to s3err. Update all call sites in the posix backend that
could return ENOSPC and return the new error when the underlying
filesystem has no space remaining.

Fixes #2093
This commit is contained in:
Ben McClelland
2026-04-28 10:34:48 -07:00
parent b7b5a347ae
commit 8ae566d44e
4 changed files with 54 additions and 0 deletions
+6
View File
@@ -199,6 +199,7 @@ const (
ErrQuotaExceeded
ErrVersioningNotConfigured
ErrACLsDisabled
ErrNoSpaceLeftOnDevice
// Admin api errors
ErrAdminAccessDenied
@@ -904,6 +905,11 @@ var errorCodeResponse = map[ErrorCode]APIError{
Description: "Access control lists are disabled at the gateway level",
HTTPStatusCode: http.StatusBadRequest,
},
ErrNoSpaceLeftOnDevice: {
Code: "InsufficientStorage",
Description: "No space left on device.",
HTTPStatusCode: http.StatusInsufficientStorage,
},
// Admin api errors
ErrAdminAccessDenied: {