{"record":{"id":"1f80c34ad0f935c9","repo":"juanfont/headscale","slug":"invalid-synchronous","errorCode":null,"errorMessage":"invalid synchronous","messagePattern":"invalid synchronous","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hscontrol/db/sqliteconfig/config.go","lineNumber":19,"sourceCode":"// Package sqliteconfig provides type-safe configuration for SQLite databases\n// with proper enum validation and URL generation for modernc.org/sqlite driver.\npackage sqliteconfig\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n)\n\n// Errors returned by config validation.\nvar (\n\tErrPathEmpty           = errors.New(\"path cannot be empty\")\n\tErrBusyTimeoutNegative = errors.New(\"busy_timeout must be >= 0\")\n\tErrInvalidJournalMode  = errors.New(\"invalid journal_mode\")\n\tErrInvalidAutoVacuum   = errors.New(\"invalid auto_vacuum\")\n\tErrWALAutocheckpoint   = errors.New(\"wal_autocheckpoint must be >= -1\")\n\tErrInvalidSynchronous  = errors.New(\"invalid synchronous\")\n\tErrInvalidTxLock       = errors.New(\"invalid txlock\")\n)\n\nconst (\n\t// DefaultBusyTimeout is the default busy timeout in milliseconds.\n\tDefaultBusyTimeout = 10000\n)\n\n// JournalMode represents SQLite journal_mode pragma values.\n// Journal modes control how SQLite handles write transactions and crash recovery.\n//\n// Performance vs Durability Tradeoffs:\n//\n// WAL (Write-Ahead Logging) - Recommended for production:\n//   - Best performance for concurrent reads/writes\n//   - Readers don't block writers, writers don't block readers\n//   - Excellent crash recovery with minimal data loss risk\n//   - Uses additional .wal and .shm files","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/hscontrol/db/sqliteconfig/config.go#L1-L37","documentation":"Error \"invalid synchronous\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at hscontrol/db/sqliteconfig/config.go:19 when the library encounters an invalid state.","commonSituations":"Set database.sqlite.synchronous to a valid SQLite synchronous mode (OFF, NORMAL, FULL, EXTRA). NORMAL is recommended with WAL; anything else fails config validation.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (invalid synchronous); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (invalid synchronous); retry the operation after fixing the input, configuration, or environment.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}