From 81e927501e2d0b0bb20714d4c538035a0f0024f1 Mon Sep 17 00:00:00 2001 From: core Date: Sun, 30 Jul 2023 14:58:37 -0400 Subject: [PATCH] hosts:edit 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 1a4bef5..5e89527 100644 --- a/trifid-api/src/routes/v1/hosts.rs +++ b/trifid-api/src/routes/v1/hosts.rs @@ -1494,11 +1494,11 @@ pub async fn edit_host( let host = match host { Some(h) => 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, }],