PHPackages                             papimod/http-error - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. papimod/http-error

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

papimod/http-error
==================

Module Papi

v2.1.0(4mo ago)071Apache-2.0PHPPHP &gt;=8.3.0

Since Dec 8Pushed 4mo agoCompare

[ Source](https://github.com/4uruanna/papimod-http-error)[ Packagist](https://packagist.org/packages/papimod/http-error)[ RSS](/packages/papimod-http-error/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (1)

HTTP Error Papi Module
======================

[](#http-error-papi-module)

[![](https://camo.githubusercontent.com/4893040bcf8e285d2895bb07a0985e48a3ddc545ff0abdeb11622706315de0f0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e352d3737374242343f6c6f676f3d706870)](https://camo.githubusercontent.com/4893040bcf8e285d2895bb07a0985e48a3ddc545ff0abdeb11622706315de0f0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e352d3737374242343f6c6f676f3d706870)[![](https://camo.githubusercontent.com/1a63c4971998a5b902b01583c76051a8ee8deec80235c1f6c8b5bd8e78725680/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d322d3838353633303f6c6f676f3d636f6d706f736572)](https://camo.githubusercontent.com/1a63c4971998a5b902b01583c76051a8ee8deec80235c1f6c8b5bd8e78725680/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d322d3838353633303f6c6f676f3d636f6d706f736572)

Description
-----------

[](#description)

Help integrate error and warning handling into your [papi](https://github.com/4uruanna/papi).

This module is based on the [official tutorial](https://www.slimframework.com/docs/v4/objects/application.html#advanced-notices-and-warnings-handling).

```
⚠︎ We advise against modifying the configuration of the “common module

```

Prerequisites Modules
---------------------

[](#prerequisites-modules)

- [Dotenv](https://github.com/4uruanna/papimod-dotenv)
- [Common](https://github.com/4uruanna/papimod-common)

Configuration
-------------

[](#configuration)

### `ENVIRONMENT` (.ENV)

[](#environment-env)

RequiredNoType`PRODUCTION`, `DEVELOPMENT`, `TEST` or `null`DescriptionDisplay error details when is not set to `PRODUCTION`Default`null`Usage
-----

[](#usage)

You can add the following options to your `.env` file:

```
ENVIRONMENT=DEVELOPMENT
```

Import the module when creating your application:

```
require __DIR__ . "/../vendor/autoload.php";

use Papi\PapiBuilder;
use Papimod\Dotenv\DotEnvModule;
use Papimod\Common\CommonModule;
use Papimod\HttpError\HttpErrorModule;
use function DI\create;

$builder = new PapiBuilder();

$builder
    ->setModule(
        DotEnvModule::class, # Prerequisite
        CommonModule::class,
        HttpErrorModule::class
    )
    ->build()
    ->run();
```

Use one of the following [exceptions](./source/exception/) whenever you want:

```
use Papi\abstract\PapiGet;
use Papimod\HttpError\exception\NotImplementedException;
use Slim\Psr7\Request;
use Slim\Psr7\Response;

final class NotImplementedGet extends PapiGet
{
    public static function getPattern(): string
    {
        return "/notImplemented";
    }

    public function __invoke(Request $request, Response $response): Response
    {
        throw new NotImplementedException($request);
    }
}
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance74

Regular maintenance activity

Popularity4

Limited adoption so far

Community8

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 ~6 days

Total

3

Last Release

146d ago

Major Versions

v1.0.1 → v2.1.02025-12-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/22fd4dcec379ce472b56c0f51528fa61ce156e5063756abcce648361770fc839?d=identicon)[4uruanna](/maintainers/4uruanna)

---

Top Contributors

[![4uruanna](https://avatars.githubusercontent.com/u/179627698?v=4)](https://github.com/4uruanna "4uruanna (17 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/papimod-http-error/health.svg)

```
[![Health](https://phpackages.com/badges/papimod-http-error/health.svg)](https://phpackages.com/packages/papimod-http-error)
```

PHPackages © 2026

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