Crash & Error Reporter
Overview
A drop-in error reporter for any Roblox game. Captures server-side script crashes (with full stack traces), warnings, and optional client-side errors, then forwards them as rich Discord embeds. Smart deduplication kills repeating spam. Rate-limited queue with retry/backoff respects Discord's webhook caps. Multi-channel routing lets you split severities across separate Discord channels. Daily digests post a "top 5 errors" summary at a fixed UTC hour. Defensive design throughout — every external call is pcall-wrapped, recursion guards prevent feedback loops, the logger itself can never crash your game.
You should know when your game breaks. This product makes that automatic.
Open source. Plain Luau. No obfuscation. Edit any file.
The Capture
Server-Side
- ScriptContext.Error — full stack traces for unhandled crashes
- LogService.MessageOut — captures
warn()calls and (optionally)print() - Auto-deduplication between the two — you get one rich post per root cause, not two
- Self-filtering — internal warns prefixed with
[CoreShunErrorLogger]are skipped to prevent feedback loops
Client-Side (opt-in)
- LocalScript errors forwarded to the server via RemoteEvent
- Tagged
[CLIENT:PlayerName]in the embed so you can tell server vs client at a glance - Client-side rate limiting (10/min per client) prevents a misbehaving client from flooding the server
- Single config flag (Capture.ClientErrors = true) to enable
Smart Deduplication
The biggest Discord-spam killer. A single bug can fire 1000 errors per minute — without dedupe your channel becomes unreadable.
- Hash-based — message + first 3 stack frames identify duplicates
- Configurable window — default 5 minutes; identical errors within the window collapse
- Recurrence summaries — every Nth duplicate (default 25) posts a compact "this fired N more times" summary so you still know
- LRU-bounded — dedupe table caps at 500 entries (configurable); oldest evicts on overflow so unique-error storms can't leak memory
- Doubles as digest source — the daily digest reads top errors from the same dedupe table
- One flag to disable if you want every individual error posted (Dedupe.Enabled = false)
Rate Limit + Queue
- Token bucket — default 25/min (Discord caps at 30; we leave headroom for retries)
- Bounded queue — default 200 messages; overflow drops oldest with a one-time warn
- Retry on 429/5xx — honors Discord's
retry_afterheader when present, exponential backoff capped at 4× base otherwise - Permanent-fail skip — 400/401/403/404 don't retry (won't fix themselves) and fire OnWebhookFail immediately
- Per-message retry cap — default 3 attempts before drop
- Background coroutine — pipeline runs in a separate task.spawn'd worker, doesn't block the capture handlers
Multi-Channel Routing
Default: everything to one webhook. Need split routing? Set per-severity URLs:
Severity.ErrorWebhookUrl— errors →#criticalSeverity.WarningWebhookUrl— warnings → quieter#warningsSeverity.InfoWebhookUrl— info-level reports →#infoDailySummary.WebhookUrl— digest →#daily-stats- Empty values fall back to
Config.Webhook.Url— single-channel mode just leaves them blank - Per-severity enable toggles —
SendError / SendWarning / SendInfofor global mute of a severity
Daily Digest
- Top errors of the past 24h — top 5 by frequency, with sample messages
- Server stats included — total errors, total warnings, queue drops, send failures, peak players, uptime
- Configurable UTC hour — fires once per server per day
- Optional separate webhook — keeps digests out of the noisy errors channel
- Manual trigger via
_G.CoreShunErrorLogger_PostDigest()
Pattern Filters
Lua patterns (NOT regex). Match against error message OR source path. Bad patterns are pcall'd safely (treat as no-match).
- IgnorePatterns — list of Lua patterns; matches are silently dropped (mute known noise)
- AllowPatterns — optional whitelist; if non-empty, message OR source MUST match one to be captured
- Per-pattern pcall — a malformed pattern won't crash the pipeline
Rich Discord Embeds
- Color-coded by severity — red errors, amber warnings, blue info, purple summaries / digest
- Stack traces in monospace code blocks — clamped to a configurable max with "..." truncation
- Server context — placeId, jobId, server uptime, current player count
- Player context — script "owner" if it lives under a Player tree; sample of online players
- Configurable embed colors — match your server's brand
- Custom footer text + optional ServerTag for multi-game Discord setups
- ISO 8601 timestamps — Discord renders these as "humanized" timestamps
- Webhook bot identity — configurable username + avatar URL
Buyer Hooks
Define handlers in
Config.Hooks (preferred — declarative) OR set them on _G at runtime. Config wins if both are set. All hooks are pcall'd — a buggy hook can't crash the logger.OnError(entry)— pre-process; returnfalseto drop the messageBeforeSend(payload, entry)— mutate the JSON before send (add @role mentions, reshape for Slack/Teams, attach extra fields)OnWebhookFail(err, payload)— Discord rejected after retries; persist locally, swap webhooks, alert via different channelOnDailySummary(digest)— fires when the digest builds; read top-error stats, write to your analytics
Runtime API (
_G hooks)Reporting:
_G.CoreShunErrorLogger_Report(msg, severity, extra)— generic_G.CoreShunErrorLogger_ReportError(msg, extra)— shorthand_G.CoreShunErrorLogger_ReportWarning(msg, extra)— shorthand_G.CoreShunErrorLogger_ReportInfo(msg, extra)— shorthand
State and control:
_G.CoreShunErrorLogger_GetStats()— { errors, warnings, queueSize, queueDropped, sent, sendFailed, dedupeSkipped, peakPlayers, uptimeSeconds }_G.CoreShunErrorLogger_GetTopErrors(n)— top N most-frequent errors_G.CoreShunErrorLogger_FlushQueue()— drain queue immediately (subject to token bucket)_G.CoreShunErrorLogger_PostDigest()— trigger the daily digest right now
Defensive Design
The whole point of an error reporter is that it works when everything else doesn't. So:
- Pcall everything — every external call (HTTP, JSONEncode, hook invocation, Lua pattern match, Player API, time API) is pcall-wrapped
- Recursion guard — while processing an error, all further capture is suppressed; an internal bug can't feedback-loop into infinite errors
- Self-filter — internal warns prefixed with the LogPrefix are skipped by the LogService capture hook
- Bounded memory — dedupe table (default 500), queue (default 200) both have hard caps with safe overflow handling
- Graceful boot — if HTTP is disabled or webhook URL is empty, script no-ops with a clear warn (doesn't crash)
- Graceful retire — Discord 4xx errors don't retry forever; OnWebhookFail fires after MaxRetries
- Hook isolation — buyer hooks pcall'd; a buggy hook logs a warn and the pipeline continues
- No assumptions — every config field has a sensible default; missing fields don't crash
What's Included
- CoreShunErrorLogger.rbxmx — drop into Workspace + run installer
- ErrorLoggerConfig.lua — single config ModuleScript (the only file you edit)
- ErrorLoggerServer.lua — capture + queue + dedupe + send pipeline (~530 lines, defensive throughout)
- ErrorLoggerClient.lua — opt-in client error pipe
- Installer.lua — one-click installer for Studio Command Bar
- Manual.pdf — comprehensive feature guide with examples
- Cheatsheet.pdf — visual quick-reference
- README.txt — setup + reference
- Rojo project — for active development
Easy Installation
- Drag
CoreShunErrorLogger.rbxmxinto your place - Open the Studio Command Bar
- Run
require(workspace.CoreShunErrorLogger.Installer) - Open
ErrorLoggerConfigin ReplicatedStorage and paste your Discord webhook URL intoConfig.Webhook.Url - Game Settings → Security → "Allow HTTP Requests" = ON
- Press F5 — errors auto-forward to Discord
Need a webhook URL? Discord → Server Settings → Integrations → Webhooks → New Webhook → Copy URL.
Frequently Asked
My errors aren't showing up in Discord. What do I check?
In order: (1) Allow HTTP Requests is ON; (2)
Config.Webhook.Url is set and not empty; (3) the URL is valid (test it from PowerShell); (4) Output isn't showing the boot warning; (5) _G.CoreShunErrorLogger_GetStats().sendFailed > 0 means Discord is rejecting.How do I test it without breaking my game?
Drop a server Script with
_G.CoreShunErrorLogger_ReportError("Test"). Embed appears in Discord within ~1 second. (Note: Studio Command Bar during F5 is the CLIENT VM, where this function isn't defined — use a server Script for testing.)Can I forward to Slack / Teams / a custom endpoint?
Slack and Teams accept Discord-shaped JSON with minor tweaks. Use
Config.Hooks.BeforeSend to reshape the payload. Or set Webhook.Url to any HTTP POST endpoint.Will this slow my game?
No. Capture handlers are O(1). Send pipeline runs in a background coroutine. Pcall overhead per error is microseconds.
How do I disable the daily digest?
Config.DailySummary.Enabled = false.Recurring errors only — not a fan of the summary system.
Config.Dedupe.Enabled = false. Now every individual error posts. (Beware Discord spam.)Can I have errors and warnings in different channels?
Yes — set
Config.Severity.ErrorWebhookUrl and/or Config.Severity.WarningWebhookUrl to different webhook URLs. Empty values fall back to the main URL.Does it persist errors across server sessions?
No — dedupe table and stats are per-server, in-memory. The daily digest reflects only this server's runtime. Hook OnError and write to a DataStore yourself if you need cross-server persistence.
My filter pattern isn't matching.
Lua patterns are NOT regex.
% is the escape character. "%w+" matches word characters. See Roblox's "string.match" docs.Will it conflict with other systems?
Uses its own RemoteEvent folder (
CoreShunErrorLogger_Remotes) and unique _G namespace (CoreShunErrorLogger_*). No collision with other CoreShun products.Open source?
Fully. Plain Luau, no obfuscation. Edit any file.
Pairs Well With
- Anti-Exploit Suite — pipe exploit detections through the same Discord channel for one source of truth
- Admin Dashboard — admin actions and errors in one unified Discord audit log
- Quest System — wrap your CanAccept / Custom predicates in pcalls and route failures here
More Tools by coreshun
- In-Game Systems — Quest System, Day & Night Cycle, Settings Menu, Music Player (premium), Simple Music Player, Daily Rewards, Loading Screen, Advanced Chat System, Toast, Anti-Exploit, AutoRejoin, Codes Redemption
- Studio Plugins — Color Picker, UI Wireframe, Gamepass Manager, TODO Tracker (free)
- Bundles — up to 45% off
Support
Discord: discord.com/invite/hdB5tadkk8
$4.99 · Discord webhook integration · Smart dedupe · Multi-channel routing · Daily digest · Buyer hooks · Open source
