mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-10 09:16:16 +00:00
Refactor documentation and add new features
- Updated index.md to simplify structure and focus on task-oriented guides. - Revised notifications.md to streamline setup instructions and improve clarity. - Added report-error.js for structured error reporting to Discord. - Introduced account-creation.md and configuration.md for detailed guidance on account setup and bot configuration. - Created dashboard.md, docker.md, error-reporting.md, modes.md, running.md, scheduling.md, setup.md, troubleshooting.md, and update.md for comprehensive documentation on respective features and usage. - Updated package-lock.json and package.json to include peer dependencies.
This commit is contained in:
16
docs/error-reporting.md
Normal file
16
docs/error-reporting.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Error Reporting API
|
||||
|
||||
## What it does
|
||||
Accepts structured error reports and forwards them to Discord in a clean format.
|
||||
|
||||
## How to use
|
||||
- Set `DISCORD_WEBHOOK_URL` in your environment.
|
||||
- Send a POST request to `/api/report-error` with JSON that includes at least `error`.
|
||||
- Optional fields: `summary`, `type`, `metadata` (object), `environment` (string or object with `name`).
|
||||
|
||||
## Example
|
||||
```bash
|
||||
curl -X POST https://your-deployment.vercel.app/api/report-error \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"error":"Search job failed","type":"search","metadata":{"account":"user@contoso.com"}}'
|
||||
```
|
||||
Reference in New Issue
Block a user