• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dcdpr / jp / 15615106765

12 Jun 2025 03:43PM UTC coverage: 38.703% (-0.03%) from 38.737%
15615106765

Pull #160

github

web-flow
Merge 7d2c3f38e into a74d2b6f3
Pull Request #160: refactor: simplify `Query` command implementation

0 of 211 new or added lines in 3 files covered. (0.0%)

9 existing lines in 1 file now uncovered.

3618 of 9348 relevant lines covered (38.7%)

4.66 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/crates/jp_cli/src/error.rs
1
use std::io;
2

3
use crate::cmd;
4

5
pub(crate) type Result<T> = std::result::Result<T, Error>;
6

7
/// CLI Error types
8
#[derive(Debug, thiserror::Error)]
9
pub enum Error {
10
    #[error("Command error: {0}")]
11
    Command(#[from] cmd::Error),
12

13
    #[error("Config error: {0}")]
14
    Config(#[from] jp_config::Error),
15

16
    #[error("Workspace error: {0}")]
17
    Workspace(#[from] jp_workspace::Error),
18

19
    #[error("Conversation error: {0}")]
20
    Conversation(#[from] jp_conversation::Error),
21

22
    #[error("MCP error: {0}")]
23
    Mcp(#[from] jp_mcp::Error),
24

25
    #[error("LLM error: {0}")]
26
    Llm(#[from] jp_llm::Error),
27

28
    #[error("{0} not found: {1}")]
29
    NotFound(&'static str, String),
30

31
    #[error("IO error: {0}")]
32
    Io(#[from] io::Error),
33

34
    #[error("URL error: {0}")]
35
    Url(#[from] url::ParseError),
36

37
    #[error("Bat error: {0}")]
38
    Bat(#[from] bat::error::Error),
39

40
    #[error("Attachment error: {0}")]
41
    Attachment(String),
42

43
    #[error("Editor error: {0}")]
44
    Editor(String),
45

46
    #[error("Editor error")]
47
    MissingEditor,
48

49
    #[error("No model configured. Use `--model` to specify a model.")]
50
    UndefinedModel,
51

52
    #[error("Model parameter error: {0}")]
53
    Parameter(#[from] jp_conversation::model::SetParameterError),
54

55
    #[error("Task error: {0}")]
56
    Task(Box<dyn std::error::Error + Send + Sync>),
57

58
    #[error("Template error: {0}")]
59
    Template(#[from] minijinja::Error),
60

61
    #[error("Undefined template variable: {0}")]
62
    TemplateUndefinedVariable(String),
63

64
    #[error("Replay error: {0}")]
65
    Replay(String),
66

67
    #[error("JSON error: {0}")]
68
    Json(#[from] serde_json::Error),
69

70
    #[error("Invalid JSON schema: {0}")]
71
    Schema(String),
72
}
73

74
impl Error {
NEW
75
    pub fn not_found(target: &'static str, id: &dyn ToString) -> Self {
×
NEW
76
        Self::NotFound(target, id.to_string())
×
NEW
77
    }
×
78

NEW
79
    pub fn persona_not_found(id: &dyn ToString) -> Self {
×
NEW
80
        Self::not_found("Persona", id)
×
NEW
81
    }
×
82
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc