{"record":{"id":"1627368482c135fa","repo":"jlcodes99/cockpit-tools","slug":"webdav-auto-backup-upload-failed","errorCode":null,"errorMessage":"[WebDAV] Auto backup upload failed","messagePattern":"\\[WebDAV\\] Auto backup upload failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/services/scheduledBackupService.ts","lineNumber":402,"sourceCode":"\n  if (!settings.enabled || !hasSelection(selection) || !isAutoBackupDue(settings)) {\n    return null;\n  }\n\n  const result = await createManagedBackup({\n    trigger: 'auto',\n    selection,\n    retentionDays: settings.retention_days,\n    markAsLastRun: true,\n  });\n\n  try {\n    const webdavSettings = await getWebdavSyncSettings();\n    if (webdavSettings.enabled && webdavSettings.username.trim() && webdavSettings.has_password) {\n      await uploadAutoBackupToWebdav(result.file_name);\n    }\n  } catch (error) {\n    console.warn('[WebDAV] Auto backup upload failed', error);\n  }\n\n  return result;\n}\n","sourceCodeStart":384,"sourceCodeEnd":407,"githubUrl":"https://github.com/jlcodes99/cockpit-tools/blob/1ed8b77992d62ca81fabf744deb0839ad361d5bf/src/services/scheduledBackupService.ts#L384-L407","documentation":"runAutoBackupCycle in src/services/scheduledBackupService.ts:402 creates the local auto-backup file, then optionally uploads it to WebDAV when sync is enabled (webdavSettings.enabled with non-empty username and has_password). Any rejection from uploadAutoBackupToWebdav is caught and logged as console.warn '[WebDAV] Auto backup upload failed'; the local backup still completes and is returned. Only the remote copy is missing.","triggerScenarios":"Auto backup cycle runs with WebDAV sync enabled and uploadAutoBackupToWebdav rejects — wrong server URL/credentials, network unreachable, insufficient WebDAV quota, 4xx/5xx from the server, or SSL/proxy issues.","commonSituations":"WebDAV password changed on the server but not in settings; server temporarily down or rate-limiting during scheduled backup; expired account/subscription; corporate proxy blocking the WebDAV host; misconfigured HTTPS certificate.","solutions":["Open WebDAV sync settings and re-test/re-enter the server URL, username, and password (stored password may be stale).","Verify network reachability of the WebDAV server at the time the scheduled backup runs.","Check the server's storage quota and delete old remote backups if full.","Manually run an upload to reproduce the error immediately; inspect the logged error object for the HTTP status."],"exampleFix":"// before\n} catch (error) {\n  console.warn('[WebDAV] Auto backup upload failed', error);\n}\n// after\n} catch (error) {\n  console.warn('[WebDAV] Auto backup upload failed', error);\n  await notifyUserBackupUploadFailed(error); // surface to user instead of silent warn\n}","handlingStrategy":"retry","validationCode":"// Before the cycle uploads, validate WebDAV settings:\nconst s = await getWebdavSyncSettings();\nconst ready = s.enabled && s.username.trim() && s.has_password && /^https?:\\/\\//.test(s.serverUrl ?? '');\nif (!ready) console.warn('WebDAV not configured; upload will be skipped or fail');","typeGuard":"function isWebdavReady(s: { enabled: boolean; username: string; has_password: boolean; serverUrl?: string }): boolean {\n  return s.enabled && s.username.trim().length > 0 && s.has_password && /^https?:\\/\\//.test(s.serverUrl ?? '');\n}","tryCatchPattern":"try {\n  await uploadAutoBackupToWebdav(result.file_name);\n} catch (error) {\n  console.warn('[WebDAV] Auto backup upload failed', error);\n  scheduleWebdavRetry(result.file_name, /* attempts */ 3);\n}","preventionTips":["Re-test WebDAV credentials whenever the server password changes.","Monitor server storage quota; prune old remote backups.","Schedule backups during windows of reliable connectivity; add retry with backoff."],"tags":["typescript","webdav","backup","network","graceful-degradation"],"backgroundTag":"webdav-upload-failed","analyzedSha":"1ed8b77992d62ca81fabf744deb0839ad361d5bf","analyzedAt":"2026-09-05T09:51:41.178Z","contentChangedAt":"2026-09-05T09:51:41.178Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}