{"record":{"id":"9279d35df7eeac46","repo":"clash-verge-rev/clash-verge-rev","slug":"settings-modals-backup-messages-usernamerequired","errorCode":null,"errorMessage":"settings.modals.backup.messages.usernameRequired","messagePattern":"settings\\.modals\\.backup\\.messages\\.usernameRequired","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/components/setting/mods/backup-config-viewer.tsx","lineNumber":101,"sourceCode":"\n    const checkForm = () => {\n      const username = usernameRef.current?.value\n      const password = passwordRef.current?.value\n      const url = urlRef.current?.value\n\n      if (!url) {\n        urlRef.current?.focus()\n        showNotice.error('settings.modals.backup.messages.webdavUrlRequired')\n        throw new Error(t('settings.modals.backup.messages.webdavUrlRequired'))\n      } else if (!isValidUrl(url)) {\n        urlRef.current?.focus()\n        showNotice.error('settings.modals.backup.messages.invalidWebdavUrl')\n        throw new Error(t('settings.modals.backup.messages.invalidWebdavUrl'))\n      }\n      if (!username) {\n        usernameRef.current?.focus()\n        showNotice.error('settings.modals.backup.messages.usernameRequired')\n        throw new Error(t('settings.modals.backup.messages.usernameRequired'))\n      }\n      if (!password) {\n        passwordRef.current?.focus()\n        showNotice.error('settings.modals.backup.messages.passwordRequired')\n        throw new Error(t('settings.modals.backup.messages.passwordRequired'))\n      }\n    }\n\n    const save = useLockFn(async (data: IWebDavConfig) => {\n      checkForm()\n      const signature = buildWebdavSignature({\n        webdav_url: data.url,\n        webdav_username: data.username,\n        webdav_password: data.password,\n      })\n      const trimmedUrl = data.url.trim()\n      const trimmedUsername = data.username.trim()\n","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/clash-verge-rev/clash-verge-rev/blob/5cad0f2799e74b1105e133bcfc2a45f5c1370ef1/src/components/setting/mods/backup-config-viewer.tsx#L83-L119","documentation":"Error \"settings.modals.backup.messages.usernameRequired\" thrown in clash-verge-rev/clash-verge-rev.","triggerScenarios":"Thrown at src/components/setting/mods/backup-config-viewer.tsx:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"5cad0f2799e74b1105e133bcfc2a45f5c1370ef1","analyzedAt":"2026-08-12T03:25:57.699Z","schemaVersion":2},"datasetVersion":"2026-08-12T08:17:17.861Z"}