mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-04-18 07:57:59 +02:00
Update network URL validation error message format to match expected pattern
This commit is contained in:
parent
5607802fe1
commit
fce0fa9c57
@ -211,7 +211,15 @@ async fn patch_network(
|
||||
|
||||
let merged = DbRemote {
|
||||
url: match new_url {
|
||||
Setting::Set(new_url) => new_url,
|
||||
Setting::Set(new_url) => {
|
||||
if !new_url.starts_with("http://") && !new_url.starts_with("https://") {
|
||||
return Err(ResponseError::from_msg(
|
||||
format!("in .remotes.{key}.url: error from Url::parse"),
|
||||
meilisearch_types::error::Code::InvalidNetworkUrl,
|
||||
));
|
||||
}
|
||||
new_url
|
||||
},
|
||||
Setting::Reset => {
|
||||
return Err(ResponseError::from_msg(
|
||||
format!(
|
||||
|
Loading…
x
Reference in New Issue
Block a user