iiitl / iiitl/Cp_Discord_Bot

[feat]: Add Centralized Error Handling and Logging Format

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
enhancement medium observability
Dominant language
JavaScript
Stars
0
Forks
3
PR merge metrics
No merged PRs in 30d

Description

### Problem
Error handling is inconsistent across commands; logs are mostly raw `console.error` without context metadata.

### Proposed Work
- Add a small logger utility (with command name, guild id, user id).
- Standardize catch blocks and interaction error replies.

### Acceptance Criteria
- Every command logs failures in a consistent structure.
- User-facing errors are safe and actionable.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the command handlers and existing catch blocks that use console.error, then trace how interaction error replies are sent. Identify the commands that need the shared logger and consistent handling; done means every command logs failures with command, guild, and user context, while user-facing errors remain safe and actionable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.