Refactor: Migrate unwrap calls to AppError in MCP handlers
This commit is contained in:
1 parent
4e1a633dbd
commit
0e866f2465
12 files changed
+276
-326
No files matched your search
@@ -103,3 +103,15 @@ mod tests {
|
||||
assert_eq!(err.to_string(), "Bad Request: test");
|
||||
}
|
||||
}
|
||||
|
||||
impl From<String> for AppError {
|
||||
fn from(msg: String) -> Self {
|
||||
AppError::Internal(msg)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&str> for AppError {
|
||||
fn from(msg: &str) -> Self {
|
||||
AppError::Internal(msg.to_string())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user