protected function attachPayloadErrorHandler() {
        $this->getPayloadInstance();
        if (method_exists($this->instance, 'errorHandler')) {
            $this->di->get(ErrorHandler::class)->addHandler([$this->instance, 'errorHandler']);
        }
    }