Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Creates http exceptions which can be catched and converted to error responses.

License

Notifications You must be signed in to change notification settings

chubbyphp/chubbyphp-http-exception

Repository files navigation

chubbyphp-http-exception

CI Coverage Status Mutation testing badge Latest Stable Version Total Downloads Monthly Downloads

bugs code_smells coverage duplicated_lines_density ncloc sqale_rating alert_status reliability_rating security_rating sqale_index vulnerabilities

Description

Creates http exceptions which can be catched and converted to error responses.

Requirements

  • php: ^8.2

Installation

Through Composer as chubbyphp/chubbyphp-http-exception.

composer require chubbyphp/chubbyphp-http-exception "^1.2"

Usage

<?php

declare(strict_types=1);

namespace App;

use Chubbyphp\HttpException\HttpException;

$exception = new \RuntimeException('error');

$httpException = HttpException::createBadRequest([
    'key1' => 'value1',
    'key2' => 'value2'
], $exception);

Copyright

2025 Dominik Zogg

About

Creates http exceptions which can be catched and converted to error responses.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages