Skip to content

799: Add better error logging to standup bot#782

Merged
tahminator merged 1 commit intomainfrom
799
Feb 17, 2026
Merged

799: Add better error logging to standup bot#782
tahminator merged 1 commit intomainfrom
799

Conversation

@tahminator
Copy link
Owner

@tahminator tahminator commented Feb 16, 2026

799

Description of changes

Checklist before review

  • I have done a thorough self-review of the PR
  • Copilot has reviewed my latest changes, and all comments have been fixed and/or closed.
  • If I have made database changes, I have made sure I followed all the db repo rules listed in the wiki here. (check if no db changes)
  • All tests have passed
  • I have successfully deployed this PR to staging
  • I have done manual QA in both dev (and staging if possible) and attached screenshots below.

Screenshots

@github-actions
Copy link
Contributor

Available PR Commands

  • /ai - Triggers all AI review commands at once
  • /review - AI review of the PR changes
  • /describe - AI-powered description of the PR
  • /improve - AI-powered suggestions
  • /deploy - Deploy to staging

See: https://github.com/tahminator/codebloom/wiki/CI-Commands

@github-actions
Copy link
Contributor

Title

799: Add better error logging to standup bot


PR Type

Enhancement


Description

  • Add structured Redis error logs in main

  • Implement Display for RedisClientError diagnostics

  • Conform RedisClientError to std::error::Error

  • Log both Display and Debug error formats


Diagram Walkthrough

flowchart LR
  A["main.rs: expanded Redis error logging"]
  B["error.rs: Display + Error impls"]
  C["Richer Redis diagnostics in logs"]
  A -- "prints {} and {:#?}" --> C
  B -- "provides detailed Display" --> A
Loading

File Walkthrough

Relevant files
Error handling
main.rs
More verbose Redis error logging in main                                 

internal/standup-bot/src/main.rs

  • Expand Redis get error logs with separators
  • Print both Display and Debug representations
  • Add clearer message on save failure to Redis
+10/-2   
error.rs
Add Display and Error for RedisClientError                             

internal/standup-bot/src/redis/error.rs

  • Import std::fmt and implement Display
  • Include Redis diagnostics: category, kind, flags, detail
  • Implement std::error::Error for RedisClientError
+32/-0   

@github-actions
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 Security concerns

Sensitive information exposure:
Verbose logging prints full Debug output and Redis error details, which can reveal infrastructure information (e.g., hosts, ports) or command/context. In internal/standup-bot/src/main.rs both "{}" and "{:#?}" are logged for Redis errors, and in internal/standup-bot/src/redis/error.rs the Display implementation includes e.detail() and Debug. Ensure logs never include secrets (passwords, tokens) and consider redacting endpoints or sensitive fields in production.

⚡ Recommended focus areas for review

Sensitive Logging

Very verbose error logs print both Display and full Debug for Redis errors, which may include connection details or internal metadata. Confirm that no secrets or sensitive endpoints are exposed in production logs and consider redaction if needed.

        eprintln!("Failed to save standup to Redis");
        eprintln!("Error: {}", e);
        eprintln!("Debug: {:#?}", e);
    }
}
Err(e) => {
    eprintln!("===============================================");
    eprintln!("Failed to get last standup from Redis");
    eprintln!("Error: {}", e);
    eprintln!("Debug: {:#?}", e);
    eprintln!("===============================================");
}
Log Flooding

Multi-line banners and repeated error prints on Redis failures could flood logs if Redis is unavailable. Consider rate limiting, consolidated single-line logs, or backoff to reduce noise while preserving diagnostics.

    eprintln!("===============================================");
    eprintln!("Failed to get last standup from Redis");
    eprintln!("Error: {}", e);
    eprintln!("Debug: {:#?}", e);
    eprintln!("===============================================");
}
Sensitive Detail in Display

The Display implementation surfaces Redis error detail and full debug info. Validate that e.detail() and Debug output never include credentials or sensitive values; redact if necessary.

impl fmt::Display for RedisClientError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            RedisClientError::Redis(e) => {
                write!(f, "RedisError: {:?}", e)?;
                write!(f, "\n  Category: {:?}", e.category())?;
                write!(f, "\n  Kind: {:?}", e.kind())?;
                write!(
                    f,
                    "\n  is_connection_dropped: {}",
                    e.is_connection_dropped()
                )?;
                write!(f, "\n  is_timeout: {}", e.is_timeout())?;
                write!(
                    f,
                    "\n  is_connection_refusal: {}",
                    e.is_connection_refusal()
                )?;
                write!(f, "\n  is_io_error: {}", e.is_io_error())?;
                if let Some(detail) = e.detail() {
                    write!(f, "\n  Detail: {}", detail)?;
                }
                Ok(())
            }
            RedisClientError::DateTimeParse(e) => write!(f, "DateTimeParse: {:?}", e),
        }
    }
}

@tahminator
Copy link
Owner Author

/deploy

@tahminator
Copy link
Owner Author

/deploy

@tahminator tahminator merged commit 95a4f49 into main Feb 17, 2026
21 checks passed
@tahminator tahminator deleted the 799 branch February 17, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments