Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
marcua committed Jan 20, 2025
1 parent 1d755bd commit 559a588
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hosted_db/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ pub async fn potentially_isolated_sqlite_query(
run_in_sandbox(Path::new(&isolation.nsjail_path), path, query, query_mode).await?;
println!("potentially2");
if !result.stderr.is_empty() {
let error: AybError = serde_json::from_str(&result.stderr);
let error: Result<AybError, _> = serde_json::from_str(&result.stderr);
// If the error could be deserialized into an AybError,
// return that. Otherwise, create a more generic AybError
// to at least surface an issue.
return match error {
Ok(error) => Err(error),
Err(error) => Err(AybError::QueryError {
Err(_error) => Err(AybError::QueryError {
message: format!(
"Error message from sandboxed query runner: {}",
result.stderr
Expand Down

0 comments on commit 559a588

Please sign in to comment.