mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
obj: Object api handle all errors in common location. (#1343)
This commit is contained in:
committed by
Harshavardhana
parent
5c33b68318
commit
91588209fa
@@ -105,6 +105,10 @@ const (
|
||||
ErrInvalidQuerySignatureAlgo
|
||||
ErrInvalidQueryParams
|
||||
// Add new error codes here.
|
||||
|
||||
// Extended errors.
|
||||
ErrInsufficientReadResources
|
||||
ErrInsufficientWriteResources
|
||||
)
|
||||
|
||||
// error code to APIError structure, these fields carry respective
|
||||
@@ -185,6 +189,16 @@ var errorCodeResponse = map[APIErrorCode]APIError{
|
||||
Description: "We encountered an internal error, please try again.",
|
||||
HTTPStatusCode: http.StatusInternalServerError,
|
||||
},
|
||||
ErrInsufficientReadResources: {
|
||||
Code: "InternalError",
|
||||
Description: "We cannot satisfy sufficient read resources requested at this moment, please try again.",
|
||||
HTTPStatusCode: http.StatusInternalServerError,
|
||||
},
|
||||
ErrInsufficientWriteResources: {
|
||||
Code: "InternalError",
|
||||
Description: "We cannot satisfy sufficient write resources requested at this moment, please try again.",
|
||||
HTTPStatusCode: http.StatusInternalServerError,
|
||||
},
|
||||
ErrInvalidAccessKeyID: {
|
||||
Code: "InvalidAccessKeyID",
|
||||
Description: "The access key ID you provided does not exist in our records.",
|
||||
|
||||
Reference in New Issue
Block a user