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
@@ -96,6 +96,7 @@ impl ApiHandler for AdminApiServer {
const API_NAME_DISPLAY: &'static str = "Admin";
type Endpoint = Endpoint;
type Error = Error;
fn parse_endpoint(&self, req: &Request<Body>) -> Result<Endpoint, Error> {
Endpoint::from_request(req)