protected function respond($event, $error, $status, $payload = [])
    {
        $response = $this->events->fire($event, $payload, true);

        $jsonApiError = new JsonApiError(str_replace('_', ' ', $error));
        $jsonApiError->setStatusCode($status);

        return $response ?: $this->response->json(['errors' => [$jsonApiError]], $status);
    }