aboutsummaryrefslogtreecommitdiff
path: root/src/api/generic_server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-07 14:45:52 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-07 14:45:52 +0100
commite524e7a30d4d81c84f1c110017ad972dc5617bf6 (patch)
tree446b074e199c47c109fa517e5ec6717c2fe15b5f /src/api/generic_server.rs
parentfe48d60d2b63a9914297558bd5dbccae8d96c947 (diff)
downloadgarage-e524e7a30d4d81c84f1c110017ad972dc5617bf6.tar.gz
garage-e524e7a30d4d81c84f1c110017ad972dc5617bf6.zip
[dep-upgrade-202402] rename BytesBody into ErrorBody for clarity
Diffstat (limited to 'src/api/generic_server.rs')
-rw-r--r--src/api/generic_server.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/generic_server.rs b/src/api/generic_server.rs
index e3005f8a..20d70833 100644
--- a/src/api/generic_server.rs
+++ b/src/api/generic_server.rs
@@ -30,7 +30,7 @@ use garage_util::forwarded_headers;
use garage_util::metrics::{gen_trace_id, RecordDuration};
use garage_util::socket_address::UnixOrTCPSocketAddress;
-use crate::helpers::{BoxBody, BytesBody};
+use crate::helpers::{BoxBody, ErrorBody};
pub(crate) trait ApiEndpoint: Send + Sync + 'static {
fn name(&self) -> &'static str;
@@ -40,7 +40,7 @@ pub(crate) trait ApiEndpoint: Send + Sync + 'static {
pub trait ApiError: std::error::Error + Send + Sync + 'static {
fn http_status_code(&self) -> StatusCode;
fn add_http_headers(&self, header_map: &mut HeaderMap<HeaderValue>);
- fn http_body(&self, garage_region: &str, path: &str) -> BytesBody;
+ fn http_body(&self, garage_region: &str, path: &str) -> ErrorBody;
}
#[async_trait]