PHPackages                             avalanche-development/crash-pad - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. avalanche-development/crash-pad

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

avalanche-development/crash-pad
===============================

0.5.0(9y ago)05501MITPHPPHP &gt;=5.6.0

Since Nov 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/avalanche-development/crash-pad)[ Packagist](https://packagist.org/packages/avalanche-development/crash-pad)[ RSS](/packages/avalanche-development-crash-pad/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (6)Versions (8)Used By (1)

crash-pad
=========

[](#crash-pad)

Error handler that utilizes [peel](https://github.com/avalanche-development/peel) exceptions to standardize responses.

[![Build Status](https://camo.githubusercontent.com/1d7b0a602978f010c52336a35e141291e251183ee15e5c5a1e5152e7478dced8/68747470733a2f2f7472617669732d63692e6f72672f6176616c616e6368652d646576656c6f706d656e742f63726173682d7061642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/avalanche-development/crash-pad)[![Code Climate](https://camo.githubusercontent.com/1575c7c9b3d621580a20e3ebb6cbff42f0d660b7dc32988337b2aebf0266f9be/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6176616c616e6368652d646576656c6f706d656e742f63726173682d7061642f6261646765732f6770612e737667)](https://codeclimate.com/github/avalanche-development/crash-pad)[![Test Coverage](https://camo.githubusercontent.com/2fca93a29426f517a3a8426409051aaf4d20fa3ce6f983a6babe33a5ecec7b9a/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6176616c616e6368652d646576656c6f706d656e742f63726173682d7061642f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/avalanche-development/crash-pad/coverage)

Installation
------------

[](#installation)

It's recommended that you use [Composer](https://getcomposer.org/) to install crash-pad.

```
$ composer require avalanche-development/crash-pad
```

crash-pad requires PHP 5.6 or newer.

Usage
-----

[](#usage)

This handler works best with [peel](https://github.com/avalanche-development/peel). It can work without, but without the HttpErrorInterface exceptions all of the responses are going to default as 500 Server Errors.

Depending on the framework you're using, this can be hooked up in a few different ways. In Slim you'd attach it to the `Slim\Container`. I'm going to be biased and show this in Talus.

```
$talus = new Talus([...]);
$talus->setErrorHandler(new AvalancheDevelopment\CrashPad\ErrorHandler);
```

This will listen for exceptions that jump out of the call stack and return appropriate responses. For example, if you have some middleware like so...

```
function someMiddleware($request, $response, $next) {
    $body = (string) $request->getBody();
    $body = json_decode($value);
    if (json_last_error() !== JSON_ERROR_NONE) {
        throw new AvalancheDevelopment\Peel\HttpError\BadRequest('Invalid JSON');
    }
    // etc
}
```

The error handler will detect the `AvalancheDevelopment\Peel\HttpErrorInterface` exception and return a response like so...

```
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Invalid JSON"
}
```

All responses will include these three fields, plus the appropriate headers. Any exceptions that do not implement the `HttpErrorEnterface` will respond the default 500.

Development
-----------

[](#development)

This library is in active development. Some of the error responses may include metadata moving forward.

### Tests

[](#tests)

To execute the test suite, you'll need phpunit (and to install package with dev dependencies).

```
$ phpunit
```

License
-------

[](#license)

crash-pad is licensed under the MIT license. See [License File](LICENSE) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Total

7

Last Release

3471d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a4eb553ed7677c6aa2c5adb9d20191557e64369c14a9d4b2371c924c4517dff?d=identicon)[jacobemerick](/maintainers/jacobemerick)

---

Top Contributors

[![jacobemerick](https://avatars.githubusercontent.com/u/527814?v=4)](https://github.com/jacobemerick "jacobemerick (19 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/avalanche-development-crash-pad/health.svg)

```
[![Health](https://phpackages.com/badges/avalanche-development-crash-pad/health.svg)](https://phpackages.com/packages/avalanche-development-crash-pad)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M148](/packages/algolia-algoliasearch-client-php)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M719](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k240.0M317](/packages/sentry-sentry)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
