Pumpkin-MC/Pumpkin · warning · UpdateError

Failed to query update API

Error message

Failed to query update API: {0}

What it means

UpdateError::Http wraps an HttpError raised while calling the Pumpkin Marketplace update endpoint. The library throws it from UpdateChecker::check when the HTTP request itself fails (DNS, connection, TLS, non-success transport). It is converted automatically via #[from] HttpError, so the message embeds the underlying HTTP error text.

Solutions

  1. Verify the host has outbound HTTPS access to the Pumpkin Marketplace API (curl the endpoint manually).
  2. Retry the update check later or wrap it in error-tolerant logic so a failed check doesn't break the plugin.
  3. Check the embedded HttpError message for the root cause (DNS vs connection vs TLS) and fix networking/proxy accordingly.
  4. If a custom API base URL is configured, confirm it is correct for your server version.

Example fix

// before
let latest = update_checker.check().unwrap();
// after
match update_checker.check() {
    Ok(latest) => log::info!("latest version: {}", latest),
    Err(UpdateError::Http(e)) => log::warn!("update check skipped (network): {e}"),
    Err(e) => log::warn!("update check failed: {e}"),
}
Defensive patterns

Strategy: try-catch

Try / catch

match update_checker.check() {
    Ok(info) => /* notify */,
    Err(UpdateError::Http(e)) => log::warn!("network failure checking updates: {e}"),
    Err(e) => log::warn!("update check failed: {e}"),
}

Prevention

When it happens

Trigger: Calling pumpkin_plugin_utils::updater's UpdateChecker::check (or check_for_updates helper) when the network request to the Pumpkin Marketplace API fails: no network, DNS failure, TLS error, server unreachable, or client misconfiguration.

Common situations: Server host is offline or behind a firewall blocking outbound HTTPS; Marketplace API is temporarily down; corporate proxy interference; wrong API base URL after a version change.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09). Data as JSON: /api/errors/17061104d6175fd6. Report an issue: GitHub.

Appendix: source

Thrown at crates/pumpkin-plugin-utils/src/updater.rs:19

//! Non-blocking update checks against the marketplace `/api/v1/rest/check-update` endpoint.

use crate::{
    http::{HttpClient, HttpError},
    models::CheckUpdateResponse,
};
use thiserror::Error;
use tracing::debug;

/// Update checking errors.
#[derive(Debug, Error)]
pub enum UpdateError {
    /// Plugin has not been initialized.
    #[error(
        "Plugin-utils has not been initialized (call pumpkin_plugin_utils::init(context) first)"
    )]
    NotInitialized,
    /// HTTP error when querying update endpoint.
    #[error("Failed to query update API: {0}")]
    Http(#[from] HttpError),
    /// JSON parsing error from response.
    #[error("Failed to parse update response JSON: {0}")]
    Json(#[from] serde_json::Error),
}

/// Checks for plugin updates against the Pumpkin Marketplace API.
pub struct UpdateChecker {
    http_client: HttpClient,
}

impl Default for UpdateChecker {
    fn default() -> Self {
        Self::new()
    }
}

impl UpdateChecker {

View on GitHub (pinned to 8d4639e25a)