hosts:enroll error parity
This commit is contained in:
parent
a94fce77f1
commit
7c494bb7aa
|
@ -1789,7 +1789,7 @@ pub async fn block_host(
|
||||||
if let Some(net) = net {
|
if let Some(net) = net {
|
||||||
net_id = net.id;
|
net_id = net.id;
|
||||||
} else {
|
} else {
|
||||||
return HttpResponse::U81e92750nauthorized().json(APIErrorsResponse {
|
return HttpResponse::Unauthorized().json(APIErrorsResponse {
|
||||||
errors: vec![APIError {
|
errors: vec![APIError {
|
||||||
code: "ERR_NO_NET".to_string(),
|
code: "ERR_NO_NET".to_string(),
|
||||||
message: "This user does not own any networks. Try using an API token instead."
|
message: "This user does not own any networks. Try using an API token instead."
|
||||||
|
@ -2090,9 +2090,9 @@ pub async fn enroll_host(
|
||||||
None => {
|
None => {
|
||||||
return HttpResponse::Unauthorized().json(APIErrorsResponse {
|
return HttpResponse::Unauthorized().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