Issue 154 (#169)

* fix: Fixes #154, Changed GetObject range error to InvalidRange
This commit is contained in:
Jon Austin
2023-07-27 11:05:40 -07:00
committed by GitHub
parent 77080328c1
commit bf33b9f5a2
3 changed files with 22 additions and 1 deletions
+7
View File
@@ -106,7 +106,9 @@ const (
ErrNotImplemented
ErrPreconditionFailed
ErrInvalidObjectState
ErrInvalidRange
// Non-AWS errors
ErrExistingObjectIsDirectory
ErrObjectParentIsFile
)
@@ -374,6 +376,11 @@ var errorCodeResponse = map[ErrorCode]APIError{
Description: "The operation is not valid for the current state of the object",
HTTPStatusCode: http.StatusForbidden,
},
ErrInvalidRange: {
Code: "InvalidRange",
Description: "The requested range is not valid for the request. Try another range.",
HTTPStatusCode: http.StatusRequestedRangeNotSatisfiable,
},
ErrExistingObjectIsDirectory: {
Code: "ExistingObjectIsDirectory",
Description: "Existing Object is a directory.",