Possibility of different error types for different APIs

This commit is contained in:
Alex Auvolat
2022-05-13 13:51:34 +02:00
parent e4e1f8f0d6
commit 983037d965
7 changed files with 64 additions and 50 deletions
+1
View File
@@ -60,6 +60,7 @@ impl ApiHandler for K2VApiServer {
const API_NAME_DISPLAY: &'static str = "K2V";
type Endpoint = K2VApiEndpoint;
type Error = Error;
fn parse_endpoint(&self, req: &Request<Body>) -> Result<K2VApiEndpoint, Error> {
let (endpoint, bucket_name) = Endpoint::from_request(req)?;