{"record":{"id":"397093dd9176b4ec","repo":"diegosouzapw/OmniRoute","slug":"data-error-message-data-error-failed-to-397093","errorCode":null,"errorMessage":"data?.error?.message || data?.error || \"Failed to update provider\"","messagePattern":"data\\?\\.error\\?\\.message \\|\\| data\\?\\.error \\|\\| \"Failed to update provider\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/app/(dashboard)/dashboard/providers/components/NoAuthProvidersSection.tsx","lineNumber":76,"sourceCode":"  onToggleProvider,\n}: NoAuthProvidersSectionProps) {\n  const t = useTranslations(\"providers\");\n\n  const handleUnblock = async (providerId: string) => {\n    const alias = getProviderAlias(providerId);\n    const keysToRemove = new Set([providerId, alias].filter(Boolean) as string[]);\n    const previous = blockedProviders;\n    const next = previous.filter((p) => !keysToRemove.has(p));\n    onBlockedChange(next);\n    try {\n      const response = await fetch(\"/api/settings\", {\n        method: \"PATCH\",\n        headers: { \"Content-Type\": \"application/json\" },\n        body: JSON.stringify({ blockedProviders: next }),\n      });\n      const data = await response.json().catch(() => ({}));\n      if (!response.ok) {\n        throw new Error(data?.error?.message || data?.error || \"Failed to update provider\");\n      }\n      onBlockedChange(Array.isArray(data.blockedProviders) ? data.blockedProviders : next);\n    } catch (error) {\n      onBlockedChange(previous);\n      onError(error instanceof Error ? error.message : t(\"repairEnvFailed\"));\n    }\n  };\n\n  return (\n    <div className=\"flex flex-col gap-4\">\n      <div className=\"flex flex-wrap items-center gap-2\">\n        <h2 className=\"text-xl font-semibold flex items-center gap-2 flex-1 min-w-0\">\n          {t(\"noAuthProviders\")}{\" \"}\n          <span className=\"size-2.5 rounded-full bg-stone-500\" title={t(\"noAuthLabel\")} />\n          <ProviderCountBadge {...count} />\n        </h2>\n        <button\n          onClick={() => onBatchTest(\"no-auth\")}","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/(dashboard)/dashboard/providers/components/NoAuthProvidersSection.tsx#L58-L94","documentation":"Error \"data?.error?.message || data?.error || \"Failed to update provider\"\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/app/(dashboard)/dashboard/providers/components/NoAuthProvidersSection.tsx:76 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}