diff --git a/fishctl/src/command/config/update/v1.rs b/fishctl/src/command/config/update/v1.rs index 9b49a47..861d1fc 100644 --- a/fishctl/src/command/config/update/v1.rs +++ b/fishctl/src/command/config/update/v1.rs @@ -340,14 +340,14 @@ fn create_new_server_config( if let Some(max_size) = default_yml.get("maxFileSize") { let max_size_mb = max_size .as_i64() - .ok_or(Error::InvalidConfig("maxFileSize is not an integer"))? + .ok_or(Error::InvalidConfig("`maxFileSize` is not an integer"))? / 1_000_000; file.max_size = Some(max_size_mb as u64); } if let Some(proxy_remote_files) = default_yml.get("proxyRemoteFiles") { - let proxy_remote_files = proxy_remote_files - .as_bool() - .ok_or(Error::InvalidConfig("proxyRemoteFiles is not bool"))?; + let proxy_remote_files = proxy_remote_files.as_bool().ok_or(Error::InvalidConfig( + "`proxyRemoteFiles` is not a boolean value", + ))?; file.proxy_remote_file = Some(proxy_remote_files); } if meta.cache_remote_files { @@ -368,7 +368,7 @@ fn create_new_server_config( Some(hosts) => Some( hosts .as_vec() - .ok_or(Error::InvalidConfig("proxyBypassHosts is not an array"))? + .ok_or(Error::InvalidConfig("`proxyBypassHosts` is not an array"))? .iter() .map(|host| { host.as_str() @@ -387,7 +387,7 @@ fn create_new_server_config( enabled: true, url: url .as_str() - .ok_or(Error::InvalidConfig("proxyUrl is not a string"))? + .ok_or(Error::InvalidConfig("`proxyUrl` is not a string"))? .to_string(), bypass_hosts: http_proxy_bypass_hosts, }),