PHPackages                             controlabs/http-exceptions - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. controlabs/http-exceptions

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

controlabs/http-exceptions
==========================

PHP HTTP Status Code Exceptions

v1.1(7y ago)718331MITPHPPHP ^7.1

Since Oct 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/controlabs/php-http-exceptions)[ Packagist](https://packagist.org/packages/controlabs/http-exceptions)[ Docs](https://github.com/controlabs/php-http-exceptions)[ RSS](/packages/controlabs-http-exceptions/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (1)

php-http-exceptions
===================

[](#php-http-exceptions)

PHP HTTP Exceptions

[![Build Status](https://camo.githubusercontent.com/a4c138b13de578b9b0b9b39373261af9de2740c74e4b58aaf7ebcdea13c523ae/68747470733a2f2f7472617669732d63692e6f72672f636f6e74726f6c6162732f7068702d687474702d657863657074696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/controlabs/php-http-exceptions)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/12d6c2c99466f0a085f9c9c4bfeb880ec144ce3d7c8fac2194a275fbc89468f1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e74726f6c6162732f7068702d687474702d657863657074696f6e732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/controlabs/php-http-exceptions/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/0a3cb5b27cb973b158b76a6067b7056d393269f66853d011ebe059f201d47b87/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e74726f6c6162732f7068702d687474702d657863657074696f6e732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/controlabs/php-http-exceptions/?branch=master)[![Build Status](https://camo.githubusercontent.com/eee3ac6d7edc2fac9f4acb3761c9f1e55cae3cf08783f0ed5abbbbc9a3bf114a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e74726f6c6162732f7068702d687474702d657863657074696f6e732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/controlabs/php-http-exceptions/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/e6f8ff81e2e6d04548627ea0c4c637d9bf370c02d356e0e47129891b35b9aba4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e74726f6c6162732f7068702d687474702d657863657074696f6e732f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)[![PHPStan](https://camo.githubusercontent.com/441b5874ce4df0a2defc892979c96c46889b69cb32119d04f0b48626349f8bc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/phpstan/phpstan)

[![License](https://camo.githubusercontent.com/33741de15e0153c72bd8e63ddb1999100bd2c44d3e2806f2efb409e0a0698855/68747470733a2f2f706f7365722e707567782e6f72672f636f6e74726f6c6162732f687474702d657863657074696f6e732f6c6963656e7365)](https://packagist.org/packages/controlabs/http-exceptions)[![Latest Stable Version](https://camo.githubusercontent.com/2a9e3b5d2356a527a36590060c2c16f0acfba6c6e3eb73eac354752383a2d522/68747470733a2f2f706f7365722e707567782e6f72672f636f6e74726f6c6162732f687474702d657863657074696f6e732f762f737461626c65)](https://packagist.org/packages/controlabs/http-exceptions)[![Latest Unstable Version](https://camo.githubusercontent.com/9c887483e4074f2c0a4bf0fb74668644717ffca94ab93ad343d12e9a4a1ccc9e/68747470733a2f2f706f7365722e707567782e6f72672f636f6e74726f6c6162732f687474702d657863657074696f6e732f762f756e737461626c65)](https://packagist.org/packages/controlabs/http-exceptions)[![composer.lock](https://camo.githubusercontent.com/a7b45b91f82a373fb161038e0897c900b93549daad99ab22db877d2d1f5a1cb6/68747470733a2f2f706f7365722e707567782e6f72672f636f6e74726f6c6162732f687474702d657863657074696f6e732f636f6d706f7365726c6f636b)](https://packagist.org/packages/controlabs/http-exceptions)[![Total Downloads](https://camo.githubusercontent.com/a14b6a702afc571fdeabdaab380cc272d61182e464b55108bdb6ff5a0d2f52f4/68747470733a2f2f706f7365722e707567782e6f72672f636f6e74726f6c6162732f687474702d657863657074696f6e732f646f776e6c6f616473)](https://packagist.org/packages/controlabs/http-exceptions)

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

[](#installation)

`composer require controlabs/http-exceptions`

Usage
-----

[](#usage)

```
use Controlabs\Http\Exception\BadRequest;
```

Throws an Bad Request exception:

```
throw new BadRequest();
```

Throws an exception with a custom message:

```
throw new BadRequest("I'm gonna make him an offer he can't refuse.");
```

Response (it can return in JSON or ARRAY format):

```
try {
} catch (BadRequest $e) {
    $e->response()->toArray();
    // or
    $e->response()->toJson();
}
```

License
-------

[](#license)

This software is open source, licensed under the The MIT License (MIT). See [LICENSE](https://github.com/controlabs/php-http-exceptions/blob/master/LICENSE) for details.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~32 days

Total

2

Last Release

2749d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43862284?v=4)[Controlabs](/maintainers/controlabs)[@controlabs](https://github.com/controlabs)

---

Top Contributors

[![martinusso](https://avatars.githubusercontent.com/u/158559?v=4)](https://github.com/martinusso "martinusso (3 commits)")[![terciocm](https://avatars.githubusercontent.com/u/42988242?v=4)](https://github.com/terciocm "terciocm (1 commits)")

---

Tags

exceptionshttpphphttpphpexceptions

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/controlabs-http-exceptions/health.svg)

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

###  Alternatives

[hannesvdvreken/guzzle-debugbar

A Guzzle middleware that logs requests to debugbar's timeline

76410.4k1](/packages/hannesvdvreken-guzzle-debugbar)[swoole-bundle/swoole-bundle

Open/Swoole Symfony Bundle

6650.4k](/packages/swoole-bundle-swoole-bundle)

PHPackages © 2026

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