{"record":{"id":"2bceb1f06bbd4aea","repo":"diegosouzapw/OmniRoute","slug":"settings-api-returned-response-status","errorCode":null,"errorMessage":"Settings API returned ${response.status}","messagePattern":"Settings API returned (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/app/(dashboard)/dashboard/settings/components/RequestLimitsTab.tsx","lineNumber":38,"sourceCode":"  return typeof value === \"number\" && Number.isFinite(value)\n    ? String(value)\n    : String(DEFAULT_REQUEST_BODY_LIMIT_MB);\n}\n\nexport default function RequestLimitsTab() {\n  const t = useTranslations(\"settings\");\n  const [value, setValue] = useState(String(DEFAULT_REQUEST_BODY_LIMIT_MB));\n  const [savedValue, setSavedValue] = useState(String(DEFAULT_REQUEST_BODY_LIMIT_MB));\n  const [loading, setLoading] = useState(true);\n  const [saving, setSaving] = useState(false);\n  const [message, setMessage] = useState<Message | null>(null);\n\n  useEffect(() => {\n    let active = true;\n\n    fetch(\"/api/settings\")\n      .then((response) => {\n        if (!response.ok) throw new Error(`Settings API returned ${response.status}`);\n        return response.json() as Promise<SettingsResponse>;\n      })\n      .then((settings) => {\n        if (!active) return;\n        const nextValue = normalizeInputValue(settings.maxBodySizeMb);\n        setValue(nextValue);\n        setSavedValue(nextValue);\n      })\n      .catch((error) => {\n        console.error(\"Failed to load request limit settings:\", error);\n        if (active) {\n          setMessage({ type: \"error\", text: t(\"requestBodyLimitLoadFailed\") });\n        }\n      })\n      .finally(() => {\n        if (active) setLoading(false);\n      });\n","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/(dashboard)/dashboard/settings/components/RequestLimitsTab.tsx#L20-L56","documentation":"Error \"Settings API returned ${response.status}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/app/(dashboard)/dashboard/settings/components/RequestLimitsTab.tsx:38 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"}