mirror of
https://github.com/versity/versitygw.git
synced 2026-10-01 12:16:12 +00:00
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:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user