badges/shields · error · InvalidResponse
response.error || 'service error'
Error message
response.error || 'service error'
What it means
The UptimeObserver base fetch() throws InvalidResponse when the upstream API response body contains an error field. The badge shows the API's own error text if present, otherwise the generic 'service error'. This indicates UptimeObserver itself rejected the request or reported a problem rather than returning monitor data.
Source
Thrown at services/uptimeobserver/uptimeobserver-base.js:49
async fetch({ monitorKey }) {
this.constructor.ensureIsMonitorApiKey(monitorKey)
// Docs for API: https://support.uptimeobserver.com/shields-api.yaml
const url = `https://app.uptimeobserver.com/api/monitor/status/${monitorKey}`
const response = await this._requestJson({
schema: singleMonitorResponse,
url,
options: {
method: 'GET',
},
logErrors: [],
})
// Handle error responses
if (response.error) {
throw new InvalidResponse({
prettyMessage: response.error || 'service error',
})
}
return response
}
}
View on GitHub (pinned to 766fd8bc89)
Solutions
- Read the prettyMessage for the upstream error text and act on it (usually key or monitor invalid).
- Regenerate the monitor API key and update the badge URL.
- Confirm the monitor still exists in your UptimeObserver account.
- Retry later if the upstream service is having an outage.
Defensive patterns
Strategy: try-catch
Try / catch
try { const d = await fetchUptimeObserver(key, id) } catch (e) { if (e instanceof InvalidResponse) fallbackToCachedStatus(); else throw e } Prevention
- Rotate API keys before expiry and keep badge URLs in sync.
- Monitor UptimeObserver status for upstream incidents.
- Cache the last good badge data to survive transient upstream errors.
When it happens
Trigger: Any uptime-observer badge request where the parsed JSON response has a truthy error property; fetch() checks response.error after the request completes.
Common situations: Expired or revoked monitor API key; monitor deleted from UptimeObserver; upstream API outage or rate limiting returning an error payload.
Related errors
- service error
- unparseable json response
- invalid response data from auth endpoint
- unparseable svg response
- unparseable toml response
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/2be6b66ac64f92c9.
Report an issue: GitHub.