From 1afbab3a41b68194ed36048f0b5e3b1eeb25c25d Mon Sep 17 00:00:00 2001 From: c0repwn3r Date: Sun, 30 Jul 2023 14:39:52 -0400 Subject: [PATCH] hosts:get error parity --- tfclient/Cargo.toml | 1 - trifid-api/src/routes/v1/hosts.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tfclient/Cargo.toml b/tfclient/Cargo.toml index e22f34d..89eab80 100644 --- a/tfclient/Cargo.toml +++ b/tfclient/Cargo.toml @@ -31,7 +31,6 @@ base64-serde = "0.7" dnapi-rs = { version = "0.1", path = "../dnapi-rs" } serde_yaml = "0.9" nebula-ffi = { version = "0.1", path = "../nebula-ffi", optional = true } - [package.metadata.deb] maintainer = "c0repwn3r " copyright = "e3team " diff --git a/trifid-api/src/routes/v1/hosts.rs b/trifid-api/src/routes/v1/hosts.rs index 9a03600..806820a 100644 --- a/trifid-api/src/routes/v1/hosts.rs +++ b/trifid-api/src/routes/v1/hosts.rs @@ -1002,11 +1002,11 @@ pub async fn get_host(id: Path, req_info: HttpRequest, db: Data h, None => { - return HttpResponse::Unauthorized().json(APIErrorsResponse { + return HttpResponse::NotFound().json(APIErrorsResponse { errors: vec![APIError { - code: "ERR_UNAUTHORIZED".to_string(), + code: "ERR_NOT_FOUND".to_string(), message: - "This resource does not exist or you do not have permission to access it." + "resource not found" .to_string(), path: None, }],