mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
profiler: Download API returns error when all nodes fail (#6525)
When download profiling data API fails to gather profiling data from all nodes for any reason (including profiler not enabled), return 400 http code with the appropriate json message.
This commit is contained in:
@@ -291,6 +291,7 @@ const (
|
||||
ErrInvalidColumnIndex
|
||||
ErrMissingHeaders
|
||||
ErrAdminConfigNotificationTargetsFailed
|
||||
ErrAdminProfilerNotEnabled
|
||||
)
|
||||
|
||||
// error code to APIError structure, these fields carry respective
|
||||
@@ -892,6 +893,11 @@ var errorCodeResponse = map[APIErrorCode]APIError{
|
||||
Description: "Configuration update failed due an unsuccessful attempt to connect to one or more notification servers",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
ErrAdminProfilerNotEnabled: {
|
||||
Code: "XMinioAdminProfilerNotEnabled",
|
||||
Description: "Unable to perform the requested operation because profiling is not enabled",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
ErrAdminCredentialsMismatch: {
|
||||
Code: "XMinioAdminCredentialsMismatch",
|
||||
Description: "Credentials in config mismatch with server environment variables",
|
||||
|
||||
Reference in New Issue
Block a user