PHPackages                             mnavarrocarter/problem-details - 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. [API Development](/categories/api)
4. /
5. mnavarrocarter/problem-details

ActivePackage[API Development](/categories/api)

mnavarrocarter/problem-details
==============================

A framework agnostic RFC7807 implementation

0.1.2(8y ago)01.2k2MITPHPPHP &gt;=7.1

Since Apr 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mnavarrocarter/problem-details)[ Packagist](https://packagist.org/packages/mnavarrocarter/problem-details)[ RSS](/packages/mnavarrocarter-problem-details/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (3)Used By (2)

ApiException (RFC7807 Implementation)
=====================================

[](#apiexception-rfc7807-implementation)

ApiException is an **abstract exception class for php** that implements the [RFC7807](https://tools.ietf.org/html/rfc7807) problem details structure.

It is ment to be extended into other exception classes that define specific error types, according to the RFC.

### Installing

[](#installing)

Simply do:

```
composer require mnavarrocarter/problem-details

```

Usage
-----

[](#usage)

### Creating your custom Exception Types

[](#creating-your-custom-exception-types)

For the different problem types in your api, you must create meaningful exception classes that will extend this abstract one, and override the constructor to set your custom type, title and, if you want, status code.

```
