mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-20 11:32:19 +00:00
fix(kms): tell an empty KV2 prefix from a missing mount on Vault's 404 (#6043)
This commit is contained in:
@@ -57,6 +57,17 @@ impl ScriptedResponse {
|
||||
}
|
||||
}
|
||||
|
||||
/// The 404 Vault answers a LIST of an empty path with: something routed the
|
||||
/// request and found nothing under it, so the `errors` array comes back
|
||||
/// empty. [`ScriptedResponse::error`] cannot stand in — it always fills
|
||||
/// `errors`, which is what marks a 404 as an unrouted path instead.
|
||||
pub(crate) fn empty_list_404() -> Self {
|
||||
Self::Http {
|
||||
status: 404,
|
||||
body: serde_json::json!({ "errors": [] }).to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Close the connection after consuming a request without sending an HTTP response.
|
||||
pub(crate) fn close() -> Self {
|
||||
Self::Close
|
||||
|
||||
Reference in New Issue
Block a user