badges/shields · warning · InvalidResponse
Unknown status received
Error message
Unknown status received
What it means
This InvalidResponse error is thrown by the PingPong status service's render method when the API returns a status string that is not one of the recognized cases (e.g. 'Operational', 'Degraded state', 'Issues state', 'Critical state', 'Maintenance mode'). It indicates the upstream PingPong API introduced a new/changed status label the badge does not understand.
Source
Thrown at services/pingpong/pingpong-status.service.js:38
}),
},
},
}
static defaultBadgeData = { label: 'status' }
static render({ status }) {
switch (status) {
case 'Operational':
return { message: 'up', color: 'brightgreen' }
case 'Major issues':
return { message: 'issues', color: 'orange' }
case 'Critical state':
return { message: 'down', color: 'red' }
case 'Maintenance mode':
return { message: 'maintenance', color: 'lightgrey' }
default:
throw new InvalidResponse({
prettyMessage: 'Unknown status received',
})
}
}
async fetch({ apiKey }) {
return this._requestJson({
schema,
url: `${baseUrl}/status/${apiKey}`,
})
}
async handle({ apiKey }) {
this.constructor.validateApiKey({ apiKey })
const { status } = await this.fetch({ apiKey, schema })
return this.constructor.render({ status })
}
}View on GitHub (pinned to 766fd8bc89)
Solutions
- Update/shields-io to a version whose PingPong service handles the new status string
- File an issue upstream with the exact status text received so a case can be added
- Temporarily use a different badge for that component
- Check the PingPong API docs/changelog for renamed status labels
Example fix
// before
switch (status) { case 'Operational': ... }
// after
switch (status) {
case 'Partially degraded service': return { message: 'degraded', color: 'yellow' }
case 'Operational': ...
} Defensive patterns
Strategy: fallback
Type guard
function isKnownStatus(status) {
return ['Operational', 'Partially degraded service', 'Issues state', 'Critical state', 'Maintenance mode'].includes(status)
} Try / catch
try {
const badge = await pingpongStatus(apiKey)
} catch (e) {
if (e instanceof InvalidResponse && e.message === 'Unknown status received') return { message: 'unknown status', color: 'lightgrey' }
throw e
} Prevention
- Pin to a shields version that matches your PingPong platform's status vocabulary
- Monitor PingPong changelogs for new status labels
- Wrap render with a fallback badge for unrecognized statuses
- Report unhandled status strings upstream so cases get added
When it happens
Trigger: The PingPong status endpoint responds with a status text outside the switch statement's cases — typically a newly added status level or a localized/renamed status string.
Common situations: PingPong platform updating its status vocabulary; an account with an incident state not covered by the badge logic; API version drift.
Related errors
- invalid null license
- invalid response data
- repository not found
- repository not found
- changesetRevision not found
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/191f244b986db8ec.
Report an issue: GitHub.