error_code = $code; $this->http_status = $http_status; $this->request_id = $request_id; } /** * Returns the machine-readable error code. * * @since 1.0.0 * * @return string The code. */ public function getErrorCode(): string { return $this->error_code; } /** * Returns the HTTP status, 0 when the failure was not an HTTP response. * * @since 1.0.0 * * @return int The status. */ public function getHttpStatus(): int { return $this->http_status; } /** * Returns the OpenAI request id, when present. * * @since 1.0.0 * * @return string|null The request id. */ public function getRequestId(): ?string { return $this->request_id; } }