# bettererrors/better_errors

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/bettererrors-better-errors).**

6,869 stars · 433 forks · Ruby · MIT

## Links

- GitHub: https://github.com/BetterErrors/better_errors
- awesome-repositories: https://awesome-repositories.com/repository/bettererrors-better-errors.md

## Description

Better Errors is a Rack middleware exception handler and interactive application state inspector for Ruby web applications. It intercepts unhandled exceptions to render developer-friendly error pages that provide detailed stack traces and variable inspection.

The tool provides a debugging interface that allows for live code evaluation at every stack frame of an exception. It maps stack trace entries to local filesystem paths for direct navigation to source code in an editor and restricts interface access via IP-based validation.

The project covers error response formatting for API and AJAX calls through plain text support. It also handles the interception of application crashes to provide real-time inspection of local variables and execution environments.

## Tags

### Development Tools & Productivity

- [Application Debugging](https://awesome-repositories.com/f/development-tools-productivity/application-debugging.md) — Intercepts unhandled exceptions in Rack applications to provide detailed stack traces and application state inspection.
- [Crash Diagnostics](https://awesome-repositories.com/f/development-tools-productivity/crash-diagnostics.md) — Maps application crashes to specific source code lines and restricts debugging interface access to trusted IPs.
- [Variable Inspection Tools](https://awesome-repositories.com/f/development-tools-productivity/debugging-profiling-testing/debugging-diagnostics/debugging-inspection-tools/debugging-and-inspection-tools/intermediate-output-inspection/variable-inspection-tools.md) — Allows real-time inspection of variables and evaluation of live code at specific stack frames to diagnose failures.
- [Stack Frame Inspectors](https://awesome-repositories.com/f/development-tools-productivity/dynamic-variable-evaluators/stack-frame-inspectors.md) — Binds the execution environment of the interactive shell to specific stack frames for precise variable inspection.
- [API Error Handling](https://awesome-repositories.com/f/development-tools-productivity/api-error-handling.md) — Provides plain text error details for AJAX calls and API responses by detecting non-HTML requests.
- [Editor-Integrated Debugging](https://awesome-repositories.com/f/development-tools-productivity/debugging-profiling-testing/debugging-diagnostics/debugging-inspection-tools/editor-integrated-debugging.md) — Links exception details directly to the specific file and line number in a local text editor. ([source](https://github.com/BetterErrors/better_errors/wiki/Link-to-your-editor))
- [Error Page Diagnostics](https://awesome-repositories.com/f/development-tools-productivity/error-page-diagnostics.md) — Renders detailed error pages containing stack traces and variable states to diagnose the causes of application failures. ([source](https://github.com/bettererrors/better_errors#readme))
- [Source Path Mapping](https://awesome-repositories.com/f/development-tools-productivity/path-mapping-configurations/path-mapping-configurations/repository-path-mapping/source-path-mapping.md) — Maps stack trace entries to local filesystem paths for direct navigation to source code in an editor.

### Programming Languages & Runtimes

- [Runtime Context Evaluators](https://awesome-repositories.com/f/programming-languages-runtimes/expression-evaluators/runtime-context-evaluators.md) — Provides an interactive shell to execute arbitrary Ruby code within the context of a crashed stack frame.
- [Live Code Evaluation](https://awesome-repositories.com/f/programming-languages-runtimes/live-code-evaluation.md) — Enables developers to evaluate Ruby expressions and inspect application state using an interactive shell during a crash. ([source](https://github.com/bettererrors/better_errors#readme))

### Software Engineering & Architecture

- [Process Exception Interception](https://awesome-repositories.com/f/software-engineering-architecture/exception-traceback-capture/process-exception-interception.md) — Captures unhandled exceptions at the process level and replaces standard error pages with a debugging interface. ([source](https://github.com/BetterErrors/better_errors/wiki/Non-Rails-frameworks))
- [Handler Middlewares](https://awesome-repositories.com/f/software-engineering-architecture/handler-middlewares.md) — Acts as a middleware interceptor that wraps request handlers to render developer-friendly error pages.

### System Administration & Monitoring

- [Application State Inspection](https://awesome-repositories.com/f/system-administration-monitoring/remote-system-inspection/application-state-inspection.md) — Provides a browser-based interface for inspecting application state and local variables when a Rack app fails.
- [IP Access Restrictions](https://awesome-repositories.com/f/system-administration-monitoring/ip-address-blocklists/ip-access-restrictions.md) — Restricts access to the debugging interface by validating requester IP addresses against allowed blocks.

### Web Development

- [Rack-Based Middleware Pipelines](https://awesome-repositories.com/f/web-development/backend-development/middleware-pipelines/rack-based-middleware-pipelines.md) — Implements a Rack middleware pipeline to intercept unhandled exceptions and replace default error responses.
- [Web Application Debugging](https://awesome-repositories.com/f/web-development/web-application-debugging.md) — Provides a specialized debugging interface for Ruby web applications with live code evaluation at each stack frame.

### Security & Cryptography

- [Administrative Access Restrictions](https://awesome-repositories.com/f/security-cryptography/domain-access-restrictions/administrative-access-restrictions.md) — Limits access to the administrative debugging interface by whitelisting specific requester IP addresses. ([source](https://github.com/BetterErrors/better_errors/wiki/Allowing-access-to-the-console))

### Testing & Quality Assurance

- [Custom Error Pages](https://awesome-repositories.com/f/testing-quality-assurance/debugging-diagnostics/error-handling/custom-error-pages.md) — Renders an interactive error page for Rack applications featuring detailed stack traces and variable inspection.
