public function onComplete(CompleteEvent $event)
    {
        $json = $event->getResponse()->json();

        if (array_get($json, 'result') !== 'success' || array_key_exists('response', $json) === false) {
            throw RequestException::create($event->getRequest(), $event->getResponse());
        }
    }