mirror of
https://github.com/minio/minio.git
synced 2025-11-10 22:10:12 -05:00
Move the ObjectAPI() resource to be beginning of each handlers.
We should return back proper errors so that the clients can retry until server has been initialized.
This commit is contained in:
@@ -134,6 +134,7 @@ const (
|
||||
ErrObjectExistsAsDirectory
|
||||
ErrPolicyNesting
|
||||
ErrInvalidObjectName
|
||||
ErrServerNotInitialized
|
||||
// Add new extended error codes here.
|
||||
// Please open a https://github.com/minio/minio/issues before adding
|
||||
// new error codes here.
|
||||
@@ -556,6 +557,11 @@ var errorCodeResponse = map[APIErrorCode]APIError{
|
||||
Description: "Object name contains unsupported characters. Unsupported characters are `^*|\\\"",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
ErrServerNotInitialized: {
|
||||
Code: "XMinioServerNotInitialized",
|
||||
Description: "Server not initialized, please try again.",
|
||||
HTTPStatusCode: http.StatusServiceUnavailable,
|
||||
},
|
||||
// Add your error structure here.
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user