# ExceptionSubscriber

Implements \Symfony\Component\EventDispatcher\EventSubscriberInterface

Global exception listener Should transcribe all errors into json format

author | Lukas Korinek
package | Default

### Methods

## getSubscribedEvents

    getSubscribedEvents()

static

inheritDoc |

## Creates an internal server error response and payload

    internalServerError(\Exception $exception) : \Symfony\Component\HttpFoundation\JsonResponse

### Arguments

#### $exception

`\Exception`

### Response

`\Symfony\Component\HttpFoundation\JsonResponse`

## Creates a not found error

    notFoundError(\Exception $exception) : \Symfony\Component\HttpFoundation\JsonResponse

### Arguments

#### $exception

`\Exception`

### Response

`\Symfony\Component\HttpFoundation\JsonResponse`

## Kernel exception handler

    onKernelException(\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event)

### Arguments

#### $event

`\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent`

## Creates user input error response and payload

    userInputError(\NPS\Exception\UserInputException $exception) : \Symfony\Component\HttpFoundation\JsonResponse

### Arguments

#### $exception

`\NPS\Exception\UserInputException`

### Response

`\Symfony\Component\HttpFoundation\JsonResponse`