Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions app/src/drive/sharing/dialog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use session_sharing_protocol::common::{Guest, PendingGuest, SessionId, TeamAclDa
use warp_core::ui::appearance::Appearance;
use warp_core::ui::theme::Fill as ThemeFill;
use warp_editor::editor::NavigationKey;
use warp_errors::report_error;
use warpui::clipboard::ClipboardContent;
use warpui::elements::{
Align, Border, ChildAnchor, ChildView, ConstrainedBox, Container, CornerRadius,
Expand Down Expand Up @@ -1089,9 +1088,7 @@ impl SharingDialog {
};

let Some(handle) = handle.upgrade(ctx) else {
report_error!(
"Unable to upgrade handle to TerminalView when removing guest from session"
);
log::warn!("Unable to upgrade handle to TerminalView when removing guest from session");
return;
};

Expand Down Expand Up @@ -1194,7 +1191,7 @@ impl SharingDialog {
};

let Some(handle) = handle.upgrade(ctx) else {
report_error!(
log::warn!(
"Unable to upgrade handle to TerminalView when setting guest ACL for session"
);
return;
Expand Down Expand Up @@ -1622,7 +1619,7 @@ impl SharingDialog {
}
Some(ShareableObject::Session { handle, .. }) => {
let Some(handle) = handle.upgrade(ctx) else {
report_error!("Unable to upgrade handle to TerminalView when sending email invitations for session");
log::warn!("Unable to upgrade handle to TerminalView when sending email invitations for session");
return;
};

Expand Down
3 changes: 1 addition & 2 deletions app/src/server/cloud_objects/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use async_channel::Sender;
pub use cloud_object_client::ObjectUpdateMessage;
use futures_util::stream::AbortHandle;
use instant::Instant;
use warp_errors::report_error;
use warpui::r#async::Timer;
use warpui::{Entity, ModelContext, ModelHandle, RequestState, SingletonEntity};

Expand Down Expand Up @@ -368,7 +367,7 @@ impl Listener {
log::warn!("CloudObjects::Listener: websocket connection failed to connect or finished with an error; trying again: {e:#}");
}
RequestState::RequestFailed(e) => {
report_error!(e.context("CloudObjects::Listener websocket connection failed"));
log::warn!("CloudObjects::Listener websocket connection failed: {e:#}");
}
}
},
Expand Down
6 changes: 2 additions & 4 deletions app/src/server/cloud_objects/update_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,9 +1116,7 @@ impl UpdateManager {
let task_id = match task_id.parse::<AmbientAgentTaskId>() {
Ok(task_id) => task_id,
Err(err) => {
report_error!(anyhow::Error::from(err).context(format!(
"AmbientTaskUpdated has unparseable task_id: {task_id}"
)));
log::warn!("AmbientTaskUpdated has unparseable task_id {task_id}: {err:#}");
return;
}
};
Expand Down Expand Up @@ -1551,7 +1549,7 @@ impl UpdateManager {
ctx,
);
}
Err(err) => report_error!(err.context("error getting cloud object")),
Err(err) => log::warn!("error getting cloud object: {err:#}"),
},
);

Expand Down
9 changes: 3 additions & 6 deletions app/src/server/server_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use team::TeamClient;
use url::Url;
use warp_core::context_flag::ContextFlag;
use warp_core::telemetry::TelemetryEvent;
use warp_errors::{register_error, report_error, AnyhowErrorExt, ErrorExt};
use warp_errors::{register_error, AnyhowErrorExt, ErrorExt};
use warp_managed_secrets::client::ManagedSecretsClient;
use warp_server_client::auth::{AuthClientImpl, AuthEvent, EXPERIMENT_ID_HEADER};
use warp_server_client::base_client::{
Expand Down Expand Up @@ -868,14 +868,11 @@ impl ServerApi {

let response = request.send().await;
if let Err(err) = response {
report_error!(anyhow::Error::new(err)
.context("Failed to send POST request to /client/login"));
log::warn!("Failed to send POST request to /client/login: {err:#}");
}
}
Err(err) => {
report_error!(
err.context("Could not retrieve access token for notifying user login")
);
log::warn!("Could not retrieve access token for notifying user login: {err:#}");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/server/server_api/ai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ impl<'de> serde::Deserialize<'de> for ListRunsResponse {
Ok(task) => runs.push(task),
Err(e) => {
// Log the error and skip this task instead of failing the entire request
report_error!(anyhow!("Failed to deserialize ambient agent task: {}", e));
log::warn!("Failed to deserialize ambient agent task: {e}");
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions app/src/server/server_api/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use cloud_object_client::{
pub use cloud_object_client::{GuestIdentifier, ObjectClient};
use cloud_object_models::JsonSerializer;
use cynic::{MutationBuilder, QueryBuilder, SubscriptionBuilder};
use warp_errors::report_error;
use warp_graphql::error::UserFacingErrorInterface;
use warp_graphql::generic_string_object::GenericStringObjectInput;
use warp_graphql::mutations::add_object_guests::{
Expand Down Expand Up @@ -1411,6 +1410,6 @@ fn parse_server_gso<T, S>(
Ok(object) => {
map.entry(format).or_default().push(Box::new(object));
}
Err(err) => report_error!(err.context(format!("Failed to convert {format:?} {uid}"))),
Err(err) => log::warn!("Failed to convert {format:?} {uid}: {err:#}"),
}
}
10 changes: 4 additions & 6 deletions app/src/server/telemetry/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::time::Duration;
use anyhow::Context;
use chrono::{LocalResult, TimeZone, Utc};
use warp_core::execution_mode::AppExecutionMode;
use warp_errors::{report_error, report_if_error};
use warp_errors::report_if_error;
use warpui::r#async::{FutureExt as _, Timer};
use warpui::{App, Entity, ModelContext, SingletonEntity};

Expand Down Expand Up @@ -88,7 +88,7 @@ impl TelemetryCollector {
log::info!("Successfully wrote telemetry events to disk")
}
Err(e) => {
report_error!(e.context("Failed to write telemetry events to disk"));
log::warn!("Failed to write telemetry events to disk: {e:#}");
}
}
}
Expand Down Expand Up @@ -116,7 +116,7 @@ impl TelemetryCollector {
}
}
Ok(Err(e)) => {
report_error!(e.context("Error flushing telemetry events before shutdown"));
log::warn!("Error flushing telemetry events before shutdown: {e:#}");
}
Err(_) => {
log::warn!(
Expand Down Expand Up @@ -153,9 +153,7 @@ impl TelemetryCollector {
// case where we accidentally try to re-flush the events on the next app startup.
if let Err(e) = remove_file(&path) {
if e.kind() != std::io::ErrorKind::NotFound {
report_error!(
anyhow::anyhow!(e).context("Failed to remove persisted event file")
);
log::warn!("Failed to remove persisted event file: {e:#}");
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions app/src/server/telemetry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use rudder_message::{
BatchMessageItem as RudderBatchMessage, Message as RudderMessage,
};
use warp_core::channel::RudderStackDestination;
use warp_errors::report_error;
use warpui::telemetry::Event;

use crate::auth::UserUid;
Expand Down Expand Up @@ -173,7 +172,7 @@ impl TelemetryApi {

let events = warpui::telemetry::flush_events();
if events.len() > max_event_count {
report_error!("More telemetry events in queue than the limit to persist")
log::warn!("More telemetry events in queue than the limit to persist")
}

self.persist_events_at_path(&file, max_event_count, events)?;
Expand Down
3 changes: 1 addition & 2 deletions app/src/server/telemetry/secret_redaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use lazy_static::lazy_static;
use parking_lot::RwLock;
use regex_automata::meta::Regex;
use serde_json::Value;
use warp_errors::report_error;

use crate::terminal::model::secrets::regexes::DEFAULT_REGEXES_WITH_NAMES;
const REDACTION_REPLACEMENT_CHARACTER: &str = "*";
Expand Down Expand Up @@ -59,7 +58,7 @@ where
match Regex::new_many(&patterns) {
Ok(regex) => *TELEMETRY_SECRETS_REGEX.write() = regex,
Err(err) => {
report_error!(anyhow::Error::new(err).context("Failed to build telemetry secrets regex"))
log::warn!("Failed to build telemetry secrets regex: {err:#}")
}
}
}
Expand Down
Loading