Skip to content

Discord Webhook error logging - #377

Open
jzgom067 wants to merge 8 commits into
v0.4.7from
error-accumulation
Open

Discord Webhook error logging#377
jzgom067 wants to merge 8 commits into
v0.4.7from
error-accumulation

Conversation

@jzgom067

Copy link
Copy Markdown
Member

This PR adds support for Discord Webhooks for error logging.

Webhook Integration

Previously, the addresses in ADMIN_EMAILS would be sent an email if a CRITICAL level error occurred. This functionality has been replaced with making a request to a Discord Webhook, sending a message to a specified channel.

This now also logs the ERROR level severity as well.

I'm not expecting that many errors, so there shouldn't be too many messages sent. If anything, any error should encourage us to fix it. This change is meant to increase visibility, considering that the only other way to see these errors is to SSH into the backend server and check the logs.

.env Changes

The new property DISCORD_WEBHOOK_URL specifies the endpoint to call on error. If left empty, it will not attempt to make a request.

  • If the placeholder in .env.example is copied to .env, it will cause a warning on error that tells the developer to leave the value empty.

The ADMIN_EMAILS property is no longer used, so it was removed.

@jzgom067 jzgom067 added this to the v0.4.6 milestone Jul 15, 2026
@jzgom067 jzgom067 added enhancement New feature or request cleanup Involves refactoring or small changes backend Related to backend stuff labels Jul 15, 2026
@jzgom067 jzgom067 linked an issue Jul 15, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The error notification configuration now uses DISCORD_WEBHOOK_URL instead of ADMIN_EMAILS. PlancakeLogger sends embedded error and critical messages to Discord through HTTP webhook requests when configured. The previous critical-error email and cooldown logic is removed. The environment template documents the new setting, and pinned requests dependencies are added.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
backend/requirements.txt

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
File "/usr/local/lib/python3.11/dist-packages/checkov/main.py", line 22, in
from checkov.ansible.runner import Runner as ansible_runner
File "/usr/local/lib/python3.11/dist-packages/checkov/ansible/runner.py", line 9, in
from checkov.ansible.graph_builder.local_graph import AnsibleLocalGraph
File "/usr/local/lib/python3.11/dist-packages/checkov/ansible/graph_builder/local_graph.py", line 14, in
from checkov.ansible.utils import get_scannable_file_paths, TASK_RESERVED_KEYWORDS, parse_file
File "/usr/local/lib/python3.11/dist-packages/checkov/ansible/utils.py", line 13, in
from checkov.common.runners.base_runner import filter_ignored_paths
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/base_runner.py", line 17, in
from checkov.common.output.report import Report
File "

... [truncated 567 characters] ...

pydantic/init.py", line 5, in
from ._migration import getattr_migration
File "/usr/local/lib/python3.11/dist-packages/pydantic/_migration.py", line 4, in
from pydantic.warnings import PydanticDeprecatedSince20
File "/usr/local/lib/python3.11/dist-packages/pydantic/warnings.py", line 5, in
from .version import version_short
File "/usr/local/lib/python3.11/dist-packages/pydantic/version.py", line 7, in
from pydantic_core import version as pydantic_core_version
File "/usr/local/lib/python3.11/dist-packages/pydantic_core/init.py", line 6, in
from typing_extensions import Sentinel
ImportError: cannot import name 'Sentinel' from 'typing_extensions' (/.local/lib/python3.11/site-packages/typing_extensions.py)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ce897c5d-039b-4be9-aae3-9f91f79958b9

📥 Commits

Reviewing files that changed from the base of the PR and between a37c8d0 and 9ca5ef9.

📒 Files selected for processing (3)
  • backend/.env.example
  • backend/api/settings.py
  • backend/requirements.txt

Comment thread backend/.env.example
Comment thread backend/api/settings.py
Comment thread backend/api/settings.py Outdated
@jzgom067
jzgom067 requested review from mirmirmirr and removed request for mirmirmirr July 15, 2026 18:52
@jzgom067
jzgom067 requested a review from mirmirmirr July 18, 2026 00:43
@jzgom067 jzgom067 modified the milestones: v0.4.6, v0.4.7 Jul 20, 2026
@jzgom067
jzgom067 changed the base branch from v0.4.6 to v0.4.7 July 20, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Related to backend stuff cleanup Involves refactoring or small changes enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add error accumulation and notification

1 participant