{"record":{"id":"db8c2907ae7c1a5d","repo":"ruvnet/ruflo","slug":"anthropic-response-status","errorCode":"ANTHROPIC_${response.status}","errorMessage":"${message}","messagePattern":"\\$\\{message\\}","errorType":"exception","errorClass":"LLMProviderError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/providers/src/anthropic-provider.ts","lineNumber":449,"sourceCode":"  private async handleErrorResponse(response: Response): Promise<never> {\n    const errorText = await response.text();\n    let errorData: { error?: { message?: string } };\n\n    try {\n      errorData = JSON.parse(errorText);\n    } catch {\n      errorData = { error: { message: errorText } };\n    }\n\n    const message = errorData.error?.message || 'Unknown error';\n\n    switch (response.status) {\n      case 401:\n        throw new AuthenticationError(message, 'anthropic', errorData);\n      case 429:\n        throw new RateLimitError(message, 'anthropic', undefined, errorData);\n      default:\n        throw new LLMProviderError(\n          message,\n          `ANTHROPIC_${response.status}`,\n          'anthropic',\n          response.status,\n          response.status >= 500,\n          errorData\n        );\n    }\n  }\n}\n","sourceCodeStart":431,"sourceCodeEnd":460,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/providers/src/anthropic-provider.ts#L431-L460","documentation":"handleErrorResponse mapped an Anthropic HTTP 429 response to a RateLimitError. The account or model is rate-limited; the upstream message (or raw body when unparseable) is preserved and can be retried after backoff.","triggerScenarios":"The Anthropic provider wraps a network or parsing failure with the underlying message.","commonSituations":"Network failure, timeout, or an unexpected response body from the API endpoint.","solutions":["Check network connectivity and endpoint reachability.","Log the underlying message to distinguish network errors from API errors.","Retry idempotent requests after transient failures."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}