badges/shields · error · InvalidResponse

service error

Error message

service error

What it means

UptimeRobot's fetch() throws InvalidResponse when the upstream API responds with stat === 'fail', surfacing the API's error message, or the fallback 'service error' when message is absent. UptimeRobot signals failures this way with HTTP 200, so the badge must translate the body-level failure into an error state.

Source

Thrown at services/uptimerobot/uptimerobot-base.js:82

      url: 'https://api.uptimerobot.com/v2/getMonitors',
      options: {
        method: 'POST',
        headers: {
          'cache-control': 'no-cache',
          'content-type': 'application/x-www-form-urlencoded',
        },
        form: {
          api_key: monitorSpecificKey,
          format: 'json',
          ...opts,
        },
      },
      logErrors: [],
    })

    if (stat === 'fail') {
      const { message } = error
      throw new InvalidResponse({ prettyMessage: message || 'service error' })
    }

    return { monitors }
  }
}

View on GitHub (pinned to 766fd8bc89)

Solutions

  1. Check the rendered error text (the forwarded API message) for the specific cause.
  2. Regenerate and reinstall a monitor-specific API key starting with 'm'.
  3. Confirm the monitor still exists in UptimeRobot.
  4. Wait and retry if you are being rate limited or UptimeRobot is degraded.
Defensive patterns

Strategy: try-catch

Try / catch

try { const { monitors } = await fetchUptimeRobot(key, days) } catch (e) { if (e instanceof InvalidResponse) log.warn('UptimeRobot API failed:', e.prettyMessage); throw e }

Prevention

When it happens

Trigger: Any uptimerobot badge request where the response body has stat='fail' — e.g. invalid monitorSpecificKey, monitor not found, or API limits/errors — with the error object's message forwarded when available.

Common situations: Wrong or revoked monitor API key; monitor deleted; exceeding UptimeRobot API rate limits; UptimeRobot-side API incidents.

Related errors


AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30). Data as JSON: /api/errors/c692e829e155c553. Report an issue: GitHub.