+
+ /**
+ * @param int $errorno
+ * @param Error $error
+ * @return void
+ * @throws HTTPException\InternalServerErrorException
+ */
+ protected function logAndJsonError(int $errorno, Error $error)
+ {
+ $this->logger->info('API Error', ['no' => $errorno, 'error' => $error->toArray(), 'method' => $this->args->getMethod(), 'command' => $this->args->getQueryString(), 'user-agent' => $this->server['HTTP_USER_AGENT'] ?? '']);
+ $this->jsonError(403, $error->toArray());
+ }