{"record":{"id":"191f244b986db8ec","repo":"badges/shields","slug":"unknown-status-received","errorCode":null,"errorMessage":"Unknown status received","messagePattern":"Unknown status received","errorType":"exception","errorClass":"InvalidResponse","httpStatus":null,"severity":"warning","filePath":"services/pingpong/pingpong-status.service.js","lineNumber":38,"sourceCode":"        }),\n      },\n    },\n  }\n\n  static defaultBadgeData = { label: 'status' }\n\n  static render({ status }) {\n    switch (status) {\n      case 'Operational':\n        return { message: 'up', color: 'brightgreen' }\n      case 'Major issues':\n        return { message: 'issues', color: 'orange' }\n      case 'Critical state':\n        return { message: 'down', color: 'red' }\n      case 'Maintenance mode':\n        return { message: 'maintenance', color: 'lightgrey' }\n      default:\n        throw new InvalidResponse({\n          prettyMessage: 'Unknown status received',\n        })\n    }\n  }\n\n  async fetch({ apiKey }) {\n    return this._requestJson({\n      schema,\n      url: `${baseUrl}/status/${apiKey}`,\n    })\n  }\n\n  async handle({ apiKey }) {\n    this.constructor.validateApiKey({ apiKey })\n    const { status } = await this.fetch({ apiKey, schema })\n    return this.constructor.render({ status })\n  }\n}","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/pingpong/pingpong-status.service.js#L20-L56","documentation":"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.","triggerScenarios":"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.","commonSituations":"PingPong platform updating its status vocabulary; an account with an incident state not covered by the badge logic; API version drift.","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"],"exampleFix":"// before\nswitch (status) { case 'Operational': ... }\n// after\nswitch (status) {\n  case 'Partially degraded service': return { message: 'degraded', color: 'yellow' }\n  case 'Operational': ...\n}","handlingStrategy":"fallback","validationCode":null,"typeGuard":"function isKnownStatus(status) {\n  return ['Operational', 'Partially degraded service', 'Issues state', 'Critical state', 'Maintenance mode'].includes(status)\n}","tryCatchPattern":"try {\n  const badge = await pingpongStatus(apiKey)\n} catch (e) {\n  if (e instanceof InvalidResponse && e.message === 'Unknown status received') return { message: 'unknown status', color: 'lightgrey' }\n  throw e\n}","preventionTips":["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"],"tags":["pingpong","upstream-api","unrecognized-value","status"],"backgroundTag":"unexpected-api-response","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}