Skip to main content

get_errors

Unified error aggregation across all active processes and proxies. Collects, deduplicates, and formats errors from multiple sources into a single view.

Synopsis

get_errors {}
get_errors {proxy_id: "dev", since: "5m"}

Parameters

ParameterTypeRequiredDefaultDescription
process_idstringNoallFilter to specific process
proxy_idstringNoall activeFilter to specific proxy
sincestringNononeRecency filter (RFC3339 or duration like 5m, 1h, 30s)
include_warningsboolNotrueInclude warnings alongside errors
limitintegerNo25Max errors returned
rawboolNofalseReturn full JSON instead of compact text

Error Sources

SourceLabelDescription
Process outputprocess:<id>Compile errors, panics, exceptions detected by AlertScanner pattern matching
Browser JSbrowser:jsRuntime exceptions captured by injected window.onerror handler
HTTP responsesproxy:http4xx (warning) and 5xx (error) responses from proxied requests
Proxy diagnosticsproxy:diagnosticTransport errors, connection failures, proxy-level issues
Custom logsbrowser:customApplication-level __devtool.log() calls with error or warn level

Compact Output (default)

The default output format is optimized for AI consumption — grouped by severity, deduplicated, with minimal noise.

=== Errors (2) ===

[browser:js] TypeError (3x, latest 5s ago)
Cannot read property 'map' of undefined
→ src/components/List.tsx:42:15
page: http://localhost:3000/dashboard

[proxy:http] 500 Internal Server Error (1x, 12s ago)
POST /api/users → "database connection timeout"

=== Warnings (1) ===

[proxy:http] 404 Not Found (1x, 30s ago)
GET /api/old-endpoint

Each entry shows:

  • Source and category with occurrence count and recency
  • Message (truncated to 200 chars)
  • Location (first application code frame from stack trace, if available)
  • Page URL (for browser-originated errors)

Raw Output

With raw: true, the tool returns the full JSON array of unified error objects:

get_errors {raw: true}

Response:

[
{
"source": "browser:js",
"severity": "error",
"category": "TypeError",
"message": "Cannot read property 'map' of undefined",
"location": "src/components/List.tsx:42:15",
"page": "http://localhost:3000/dashboard",
"count": 3,
"last_seen": "2024-01-15T10:30:05Z"
},
{
"source": "proxy:http",
"severity": "error",
"category": "500 Internal Server Error",
"message": "POST /api/users → \"database connection timeout\"",
"location": "",
"page": "",
"count": 1,
"last_seen": "2024-01-15T10:29:53Z"
}
]

Built-in Intelligence

Deduplication

Identical errors are merged by source + category + message + location. The count field shows how many times the error occurred, and last_seen tracks the most recent occurrence.

Stack Trace Reduction

Stack traces are reduced to the first application code frame, skipping:

  • node_modules/ and webpack/ frames
  • node:internal/ runtime frames
  • <anonymous> and webpack-internal frames
  • Go runtime/ frames

Supports JS (at func (file:line:col)), Go (/path/file.go:line), and Python (File "path", line N) stack formats.

Noise Filtering

HTTP errors are automatically filtered to remove common noise:

  • Redirects: 301, 302, 304
  • Static asset 404s: .map, favicon, .hot-update.
  • Dev tooling 404s: __webpack_hmr, sockjs-node, WebSocket URLs

Error Message Extraction

For HTTP errors, the tool extracts meaningful error messages from response bodies:

  • JSON: Checks message, error, detail, error_description fields
  • HTML: Strips tags and extracts text content
  • Plain text: Used directly (truncated to 200 chars)

Sorting

Results are sorted by severity (errors before warnings), then by recency (most recent first) within each group.

Examples

Quick Error Check

// All current errors and warnings
get_errors {}

// Errors only, no warnings
get_errors {include_warnings: false}

Filtered Queries

// Errors from a specific proxy
get_errors {proxy_id: "dev"}

// Process errors from a specific script
get_errors {process_id: "dev-server"}

// Errors from the last 5 minutes
get_errors {since: "5m"}

// Errors since a specific time
get_errors {since: "2024-01-15T10:00:00Z"}

Detailed Investigation

// Full JSON for programmatic analysis
get_errors {raw: true, limit: 50}

// All errors from a failing dev server
get_errors {process_id: "dev-server", raw: true}

Dual Mode Operation

Daemon Mode (default)

Full functionality. Process alerts are collected via the daemon's AlertScanner (pattern matching on process stdout/stderr) and stored in the daemon's alert ring buffer (500 entries). Proxy errors are queried from each proxy's traffic log.

Data flow for process alerts:

Process → PTY → AlertScanner → daemon IPC (REPORT) → AlertStore → get_errors (QUERY)

Legacy Mode (no daemon)

Only proxy errors are available. Process output alerts require the daemon's AlertScanner and IPC pipeline, which are not present in legacy mode. The tool description notes this limitation.

Severity Mapping

SourceConditionSeverity
Process outputseverity: "error"error
Process outputseverity: "warning" or "info"warning
Browser JSAll runtime exceptionserror
HTTP responseStatus 500-599error
HTTP responseStatus 400-499warning
HTTP responseConnection/transport errorerror
Proxy diagnosticlevel: "error"error
Proxy diagnosticlevel: "warning"warning
Custom loglevel: "error"error
Custom loglevel: "warn"warning

Error Responses

Proxy Not Found

{
"error": "proxy \"nonexistent\" not found: ..."
}

Daemon Not Connected

In daemon mode, if the daemon connection fails:

{
"error": "daemon not connected: ..."
}

Real-World Patterns

Development Debugging Loop

// Start dev server and proxy
run {script_name: "dev", id: "app"}
proxy {action: "start", target: "http://localhost:3000", id: "dev"}

// Quick error check after making changes
get_errors {}

// Deep dive into browser errors
get_errors {proxy_id: "dev", raw: true}

// Check only process compilation errors
get_errors {process_id: "app", include_warnings: false}

Error Triage

// Get everything
get_errors {limit: 50}

// Focus on the last minute
get_errors {since: "1m"}

// Only server errors (skip 4xx warnings)
get_errors {include_warnings: false}

Correlating with Proxy Logs

// See aggregated errors first
get_errors {proxy_id: "dev"}

// Then drill into specific proxy traffic for context
proxylog {proxy_id: "dev", types: ["http"], status_codes: [500]}
proxylog {proxy_id: "dev", types: ["error"]}

See Also