hosts:get error parity
This commit is contained in:
parent
407deb1796
commit
1afbab3a41
|
@ -31,7 +31,6 @@ base64-serde = "0.7"
|
||||||
dnapi-rs = { version = "0.1", path = "../dnapi-rs" }
|
dnapi-rs = { version = "0.1", path = "../dnapi-rs" }
|
||||||
serde_yaml = "0.9"
|
serde_yaml = "0.9"
|
||||||
nebula-ffi = { version = "0.1", path = "../nebula-ffi", optional = true }
|
nebula-ffi = { version = "0.1", path = "../nebula-ffi", optional = true }
|
||||||
|
|
||||||
[package.metadata.deb]
|
[package.metadata.deb]
|
||||||
maintainer = "c0repwn3r <core@e3t.cc>"
|
maintainer = "c0repwn3r <core@e3t.cc>"
|
||||||
copyright = "e3team <admin@e3t.cc>"
|
copyright = "e3team <admin@e3t.cc>"
|
||||||
|
|
|
@ -1002,11 +1002,11 @@ pub async fn get_host(id: Path<String>, req_info: HttpRequest, db: Data<AppState
|
||||||
let host = match host {
|
let host = match host {
|
||||||
Some(h) => h,
|
Some(h) => h,
|
||||||
None => {
|
None => {
|
||||||
return HttpResponse::Unauthorized().json(APIErrorsResponse {
|
return HttpResponse::NotFound().json(APIErrorsResponse {
|
||||||
errors: vec![APIError {
|
errors: vec![APIError {
|
||||||
code: "ERR_UNAUTHORIZED".to_string(),
|
code: "ERR_NOT_FOUND".to_string(),
|
||||||
message:
|
message:
|
||||||
"This resource does not exist or you do not have permission to access it."
|
"resource not found"
|
||||||
.to_string(),
|
.to_string(),
|
||||||
path: None,
|
path: None,
|
||||||
}],
|
}],
|
||||||
|
|
Loading…
Reference in New Issue