mirror of
https://github.com/minio/minio.git
synced 2025-04-11 23:12:12 -04:00
More fixes for error messages (#5911)
This commit is contained in:
parent
98f81ced86
commit
c1f1fa3cc8
@ -87,7 +87,7 @@ func errorToUIErr(err error) uiErr {
|
|||||||
}
|
}
|
||||||
case *os.PathError:
|
case *os.PathError:
|
||||||
if os.IsPermission(e) {
|
if os.IsPermission(e) {
|
||||||
return uiErrNoPermissionsToAccessDirFiles(e).Msg("Unsufficent permissions to access `" + e.Path + "` path")
|
return uiErrNoPermissionsToAccessDirFiles(e).Msg("Insufficient permissions to access path, `" + e.Path + "`")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ func errorToUIErr(err error) uiErr {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fmtError() converts a fatal error message to a more understood error
|
// fmtError() converts a fatal error message to a more clear error
|
||||||
// using some colors
|
// using some colors
|
||||||
func fmtError(introMsg string, err error, jsonFlag bool) string {
|
func fmtError(introMsg string, err error, jsonFlag bool) string {
|
||||||
renderedTxt := ""
|
renderedTxt := ""
|
||||||
|
@ -31,46 +31,46 @@ var (
|
|||||||
|
|
||||||
uiErrInvalidCacheDrivesValue = newUIErrFn(
|
uiErrInvalidCacheDrivesValue = newUIErrFn(
|
||||||
"Invalid cache drive value",
|
"Invalid cache drive value",
|
||||||
"Please check the passed value",
|
"Please check the value in this ENV variable",
|
||||||
"MINIO_CACHE_DRIVES: List of mounted drives or directories delimited by `;`.",
|
"MINIO_CACHE_DRIVES: Mounted drives or directories are delimited by `;`",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrInvalidCacheExcludesValue = newUIErrFn(
|
uiErrInvalidCacheExcludesValue = newUIErrFn(
|
||||||
"Invalid cache excludes value",
|
"Invalid cache excludes value",
|
||||||
"Please check the passed value",
|
"Please check the passed value",
|
||||||
"MINIO_CACHE_EXCLUDE: List of cache exclusion patterns delimited by `;`.",
|
"MINIO_CACHE_EXCLUDE: Cache exclusion patterns are delimited by `;`",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrInvalidCacheExpiryValue = newUIErrFn(
|
uiErrInvalidCacheExpiryValue = newUIErrFn(
|
||||||
"Invalid cache expiry value",
|
"Invalid cache expiry value",
|
||||||
"Please check the passed value",
|
"Please check the passed value",
|
||||||
"MINIO_CACHE_EXPIRY: Cache expiry duration in days.",
|
"MINIO_CACHE_EXPIRY: Valid cache expiry duration is in days.",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrInvalidCredentials = newUIErrFn(
|
uiErrInvalidCredentials = newUIErrFn(
|
||||||
"Passed credentials are not suitable for use",
|
"Invalid credentials",
|
||||||
"Please provide correct credentials",
|
"Please provide correct credentials",
|
||||||
`Access key length should be between minimum 3 characters in length.
|
`Access key length should be between minimum 3 characters in length.
|
||||||
Secret key should not be between 8 and 40 characters.`,
|
Secret key should be in between 8 and 40 characters.`,
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrInvalidErasureEndpoints = newUIErrFn(
|
uiErrInvalidErasureEndpoints = newUIErrFn(
|
||||||
"Invalid endpoints to use in erasure mode",
|
"Invalid endpoint(s) in erasure mode",
|
||||||
"Please provide correct combinations of local/remote paths",
|
"Please provide correct combination of local/remote paths",
|
||||||
"For more information, please refer to the following link: https://docs.minio.io/docs/minio-erasure-code-quickstart-guide",
|
"For more information, please refer to https://docs.minio.io/docs/minio-erasure-code-quickstart-guide",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrInvalidNumberOfErasureEndpoints = newUIErrFn(
|
uiErrInvalidNumberOfErasureEndpoints = newUIErrFn(
|
||||||
"The total number of endpoints is not suitable for erasure mode",
|
"Invalid total number of endpoints for erasure mode",
|
||||||
"Please provide an even number of endpoints greater or equal to 4",
|
"Please provide an even number of endpoints greater or equal to 4",
|
||||||
"For more information, please refer to the following link: https://docs.minio.io/docs/minio-erasure-code-quickstart-guide",
|
"For more information, please refer to https://docs.minio.io/docs/minio-erasure-code-quickstart-guide",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrStorageClassValue = newUIErrFn(
|
uiErrStorageClassValue = newUIErrFn(
|
||||||
"Invalid storage class value",
|
"Invalid storage class value",
|
||||||
"Please check the passed value",
|
"Please check the value",
|
||||||
`MINIO_STORAGE_CLASS_STANDARD: Format "EC:<Default_Parity_Standard_Class>" (e.g. "EC:3"). This sets the number of parity disks for Minio server in Standard mode. Object are stored in Standard mode, if storage class is not defined in Put request.
|
`MINIO_STORAGE_CLASS_STANDARD: Format "EC:<Default_Parity_Standard_Class>" (e.g. "EC:3"). This sets the number of parity disks for Minio server in Standard mode. Objects are stored in Standard mode, if storage class is not defined in Put request.
|
||||||
MINIO_STORAGE_CLASS_RRS: Format "EC:<Default_Parity_Reduced_Redundancy_Class>" (e.g. "EC:3"). This sets the number of parity disks for Minio server in reduced redundancy mode. Objects are stored in Reduced Redundancy mode, if Put request specifies RRS storage class.
|
MINIO_STORAGE_CLASS_RRS: Format "EC:<Default_Parity_Reduced_Redundancy_Class>" (e.g. "EC:3"). This sets the number of parity disks for Minio server in Reduced Redundancy mode. Objects are stored in Reduced Redundancy mode, if Put request specifies RRS storage class.
|
||||||
Refer to the link https://github.com/minio/minio/tree/master/docs/erasure/storage-class for more information.`,
|
Refer to the link https://github.com/minio/minio/tree/master/docs/erasure/storage-class for more information.`,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -83,14 +83,14 @@ Refer to the link https://github.com/minio/minio/tree/master/docs/erasure/storag
|
|||||||
uiErrInvalidAddressFlag = newUIErrFn(
|
uiErrInvalidAddressFlag = newUIErrFn(
|
||||||
"--address input is invalid",
|
"--address input is invalid",
|
||||||
"Please check --address parameter",
|
"Please check --address parameter",
|
||||||
`--address binds a specific ADDRESS:PORT, ADDRESS can be an IP or hostname (default:':9000')
|
`--address binds to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname (default port is ':9000')
|
||||||
Examples: --address ':443'
|
Examples: --address ':443'
|
||||||
--address '172.16.34.31:9000'`,
|
--address '172.16.34.31:9000'`,
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrInvalidFSEndpoint = newUIErrFn(
|
uiErrInvalidFSEndpoint = newUIErrFn(
|
||||||
"The given endpoint is not suitable to activate standalone FS mode",
|
"Invalid endpoint for standalone FS mode",
|
||||||
"Please check the given FS endpoint",
|
"Please check the FS endpoint",
|
||||||
`FS mode requires only one writable disk path.
|
`FS mode requires only one writable disk path.
|
||||||
Example 1:
|
Example 1:
|
||||||
$ minio server /data/minio/`,
|
$ minio server /data/minio/`,
|
||||||
@ -98,24 +98,24 @@ Example 1:
|
|||||||
|
|
||||||
uiErrUnableToWriteInBackend = newUIErrFn(
|
uiErrUnableToWriteInBackend = newUIErrFn(
|
||||||
"Unable to write to the backend",
|
"Unable to write to the backend",
|
||||||
"Please ensure that Minio binary has write permissions to the backend",
|
"Please ensure Minio binary has write permissions for the backend",
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrUnableToReadFromBackend = newUIErrFn(
|
uiErrUnableToReadFromBackend = newUIErrFn(
|
||||||
"Unable to read from the backend",
|
"Unable to read from the backend",
|
||||||
"Please ensure that Minio binary has read permission from the backend",
|
"Please ensure Minio binary has read permissions for the backend",
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrPortAlreadyInUse = newUIErrFn(
|
uiErrPortAlreadyInUse = newUIErrFn(
|
||||||
"Port is already in use",
|
"Port is already in use",
|
||||||
"Please ensure no other program is using the same address/port",
|
"Please ensure no other program uses the same address/port",
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrNoPermissionsToAccessDirFiles = newUIErrFn(
|
uiErrNoPermissionsToAccessDirFiles = newUIErrFn(
|
||||||
"Missing permissions to access to the specified path",
|
"Missing permissions to access the specified path",
|
||||||
"Please ensure the specified path can be accessed",
|
"Please ensure the specified path can be accessed",
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
@ -127,44 +127,44 @@ Example 1:
|
|||||||
)
|
)
|
||||||
|
|
||||||
uiErrSSLUnexpectedData = newUIErrFn(
|
uiErrSSLUnexpectedData = newUIErrFn(
|
||||||
"Something is wrong with your TLS certificate",
|
"Invalid TLS certificate",
|
||||||
"Please check your certificate",
|
"Please check your certificate",
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrSSLNoPassword = newUIErrFn(
|
uiErrSSLNoPassword = newUIErrFn(
|
||||||
"no password was specified",
|
"Missing TLS password",
|
||||||
"Please set the password to this environment variable `"+TLSPrivateKeyPassword+"` so the private key can be decrypted",
|
"Please set the password to environment variable `"+TLSPrivateKeyPassword+"` so that the private key can be decrypted",
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrNoCertsAndHTTPSEndpoints = newUIErrFn(
|
uiErrNoCertsAndHTTPSEndpoints = newUIErrFn(
|
||||||
"HTTPS is specified in endpoint URLs but no TLS certificate is found on the local machine",
|
"HTTPS specified in endpoints, but no TLS certificate is found on the local machine",
|
||||||
"Please add a certificate or switch to HTTP.",
|
"Please add a certificate or switch to HTTP.",
|
||||||
"Refer to https://docs.minio.io/docs/how-to-secure-access-to-minio-server-with-tls for information about how to load a TLS certificate in th server.",
|
"Refer to https://docs.minio.io/docs/how-to-secure-access-to-minio-server-with-tls for information about how to load a TLS certificate in your server.",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrCertsAndHTTPEndpoints = newUIErrFn(
|
uiErrCertsAndHTTPEndpoints = newUIErrFn(
|
||||||
"HTTP is specified in endpoint URLs but the server in the local machine is configured with a TLS certificate",
|
"HTTP specified in endpoints, but the server in the local machine is configured with a TLS certificate",
|
||||||
"Please remove the certificate in the configuration directory or switch to HTTPS",
|
"Please remove the certificate in the configuration directory or switch to HTTPS",
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrSSLWrongPassword = newUIErrFn(
|
uiErrSSLWrongPassword = newUIErrFn(
|
||||||
"Unable to decrypt the private key using the provided password",
|
"Unable to decrypt the private key using the provided password",
|
||||||
"Please set the correct password in "+TLSPrivateKeyPassword,
|
"Please set the correct password in environment variable "+TLSPrivateKeyPassword,
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrUnexpectedDataContent = newUIErrFn(
|
uiErrUnexpectedDataContent = newUIErrFn(
|
||||||
"Unexpected data content",
|
"Unexpected data content",
|
||||||
"Please contact us at https://slack.minio.io",
|
"Please contact Minio at https://slack.minio.io",
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrUnexpectedError = newUIErrFn(
|
uiErrUnexpectedError = newUIErrFn(
|
||||||
"Unexpected error",
|
"Unexpected error",
|
||||||
"Please contact us at https://slack.minio.io",
|
"Please contact Minio at https://slack.minio.io",
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user