feat: Update Error Notifications with ComponentsV2 (#14)
Node.js CI / CI (push) Successful in 21s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m41s

## Summary

This PR updates Rosalia's Discord error notifications to use Discord's Components V2 for a beautiful, organized display.

### Changes Made

- **Removed @mention** - Error notifications no longer ping anyone
- **Updated channel** - Notifications now go to the correct channel (1474606829504954511)
- **Implemented ComponentsV2** - Using Container (type 17) with Text Display (type 10) components
- **Visual improvements**:
  - Added accent color (#E91E63) for the container
  - Added separators (type 14) between sections
  - Organized content with headers for scope, message, and stack trace
  - Code blocks for message and stack trace

### Technical Changes

1. **`src/modules/pipeLog.ts`**:
   - Created `PipeErrorOptions` and `DiscordErrorPayloadOptions` interfaces
   - Refactored `pipeError` to accept options object
   - Extracted payload creation into `createDiscordErrorPayload` helper
   - Implemented ComponentsV2 structure with container, text displays, and separators

2. **`src/utils/errorHandler.ts`**:
   - Updated error handler to use new `pipeError` interface

3. **`src/server/serve.ts`**:
   - Updated `/error` webhook endpoint to use new interface

 Created by Hikari~ 🌸

Reviewed-on: #14
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
This commit was merged in pull request #14.
This commit is contained in:
2026-02-20 20:08:45 -08:00
committed by Naomi Carrigan
parent 46aa662659
commit 9db206ebbc
7 changed files with 195 additions and 46 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
"dependencies": {
"discord-verify": "1.2.0",
"fastify": "5.2.1",
"fastify-raw-body": "^5.0.0",
"fastify-raw-body": "5.0.0",
"nodemailer": "6.10.0",
"stripe": "18.3.0"
}