Skip to content

Conversation

@ehayes2000
Copy link
Contributor

No description provided.

@claude
Copy link
Contributor

claude bot commented Jan 30, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.


if extraction_status != ExtractionStatusEnum::Incomplete {
ws_send(
if let Err(err) = ws_send(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.inspect_err is cleaner here imo.

// We have been polling this attachment for too long, so we should stop
// polling it.
ws_send(
if let Err(err) = ws_send(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.inspect_err

if let Err(e) = sender.send(message) {
tracing::error!(error=%e, "failed to send message to channel");
}
pub fn ws_send(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do tracing::instrument here you could have it automatically log errors for you so you don't need to map error each time

.await;
if let Err(err) = result {
ws_send(
if let Err(err) = result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect err

Ok(access) => match access {
AccessLevel::View | AccessLevel::Comment => {
ws_send(
if let Err(send_err) = ws_send(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect err

Ok(access) => match access {
AccessLevel::View | AccessLevel::Comment => {
ws_send(
if let Err(send_err) = ws_send(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect err

{
Err(e) => {
ws_send(&message_sender_clone, FromWebSocketMessage::Error(e));
if let Err(send_err) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect err

Ok(id) => Arc::new(id),
Err(_) => {
ws_send(
if let Err(send_err) = ws_send(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect err

)),
),
};
if let Err(send_err) = send_result {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect err

ensure_user_attachment_access(&ctx, user_context.clone(), attachments).await
{
ws_send(&message_sender_clone, FromWebSocketMessage::Error(err));
if let Err(send_err) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect err

@ehayes2000 ehayes2000 requested a review from a team as a code owner January 30, 2026 17:49
@github-actions
Copy link

github-actions bot commented Jan 30, 2026

Address PR feedback:
- Add #[tracing::instrument(skip(sender), err)] to ws_send
- Replace if let Err patterns with .ok() since errors now auto-logged
- Remove redundant manual error logging at ws_send call sites

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ehayes2000 ehayes2000 merged commit e8c5da2 into main Jan 30, 2026
38 checks passed
@ehayes2000 ehayes2000 deleted the ws-disconnect branch January 30, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants