{"record":{"id":"e6455ce54cbe3d02","repo":"juanfont/headscale","slug":"version-does-not-follow-semver-major-minor-patch-f","errorCode":null,"errorMessage":"version does not follow semver major.minor.patch format","messagePattern":"version does not follow semver major\\.minor\\.patch format","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hscontrol/db/versioncheck.go","lineNumber":25,"sourceCode":"\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/juanfont/headscale/hscontrol/types\"\n\t\"github.com/rs/zerolog/log\"\n\t\"gorm.io/gorm\"\n\t\"gorm.io/gorm/clause\"\n)\n\nvar errVersionUpgrade = errors.New(\"version upgrade not supported\")\n\nvar errVersionDowngrade = errors.New(\"version downgrade not supported\")\n\nvar errVersionMajorChange = errors.New(\"major version change not supported\")\n\nvar errVersionParse = errors.New(\"cannot parse version\")\n\nvar errVersionFormat = errors.New(\n\t\"version does not follow semver major.minor.patch format\",\n)\n\n// DatabaseVersion tracks the headscale version that last\n// successfully started against this database.\n// It is a single-row table (ID is always 1).\ntype DatabaseVersion struct {\n\tID        uint   `gorm:\"primaryKey\"`\n\tVersion   string `gorm:\"not null\"`\n\tUpdatedAt time.Time\n}\n\n// semver holds parsed major.minor.patch components.\ntype semver struct {\n\tMajor int\n\tMinor int\n\tPatch int\n}","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/hscontrol/db/versioncheck.go#L7-L43","documentation":"Error \"version does not follow semver major.minor.patch format\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at hscontrol/db/versioncheck.go:25 when the library encounters an invalid state.","commonSituations":"The version string does not match semver major.minor.patch. Use full three-component versions (e.g. 0.26.1) when embedding or comparing headscale versions.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (version does not follow semver major.minor.patch format); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (version does not follow semver major.minor.patch format); 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"}