From 7c494bb7aa3f0466aedffbc0048701d32bdb927e Mon Sep 17 00:00:00 2001 From: core Date: Sun, 30 Jul 2023 21:02:55 -0400 Subject: [PATCH] hosts:enroll error parity --- trifid-api/src/routes/v1/hosts.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trifid-api/src/routes/v1/hosts.rs b/trifid-api/src/routes/v1/hosts.rs index c0bd141..ec14f2e 100644 --- a/trifid-api/src/routes/v1/hosts.rs +++ b/trifid-api/src/routes/v1/hosts.rs @@ -1789,7 +1789,7 @@ pub async fn block_host( if let Some(net) = net { net_id = net.id; } else { - return HttpResponse::U81e92750nauthorized().json(APIErrorsResponse { + return HttpResponse::Unauthorized().json(APIErrorsResponse { errors: vec![APIError { code: "ERR_NO_NET".to_string(), message: "This user does not own any networks. Try using an API token instead." @@ -2090,9 +2090,9 @@ pub async fn enroll_host( None => { return HttpResponse::Unauthorized().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, }],