Skip to content

Commit

Permalink
view-api: fix listing apis
Browse files Browse the repository at this point in the history
  • Loading branch information
nick1udwig committed Jun 10, 2024
1 parent ce195f3 commit 59ca74d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kit"
version = "0.6.1"
version = "0.6.2"
edition = "2021"

[build-dependencies]
Expand Down
7 changes: 4 additions & 3 deletions src/view_api/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use color_eyre::{Result, eyre::eyre};
use color_eyre::{Result, Section, eyre::eyre};
use fs_err as fs;
use serde_json::json;
use tracing::{info, instrument};
Expand All @@ -9,7 +9,7 @@ use crate::{boot_fake_node::extract_zip, inject_message, KIT_CACHE, KIT_LOG_PATH

#[instrument(level = "trace", skip_all)]
fn list_apis(node: Option<&str>) -> Result<serde_json::Value> {
let message = json!("ListApis");
let message = json!("Apis");

inject_message::make_message(
"main:app_store:sys",
Expand Down Expand Up @@ -78,7 +78,8 @@ pub async fn execute(
.map_err(|e| {
let e_string = e.to_string();
if e_string.contains("Failed with status code:") {
eyre!("{}\ncheck logs (default at {}) for full http response\n\nhint: is Kinode running at url {}?", e_string, KIT_LOG_PATH_DEFAULT, url)
eyre!("{e_string}\ncheck logs (default at {KIT_LOG_PATH_DEFAULT}) for full http response")
.with_suggestion(|| "is Kinode running at url {url}?")
} else {
eyre!(e_string)
}
Expand Down

0 comments on commit 59ca74d

Please sign in to comment.