{"record":{"id":"09c9aacae38d651a","repo":"slackhq/nebula","slug":"tun-unsafe-routes-is-not-an-array","errorCode":null,"errorMessage":"tun.unsafe_routes is not an array","messagePattern":"tun\\.unsafe_routes is not an array","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"overlay/route.go","lineNumber":159,"sourceCode":"\t\t}\n\n\t\troutes[i] = r\n\t}\n\n\treturn routes, nil\n}\n\nfunc parseUnsafeRoutes(c *config.C, networks []netip.Prefix) ([]Route, error) {\n\tvar err error\n\n\tr := c.Get(\"tun.unsafe_routes\")\n\tif r == nil {\n\t\treturn []Route{}, nil\n\t}\n\n\trawRoutes, ok := r.([]any)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"tun.unsafe_routes is not an array\")\n\t}\n\n\tif len(rawRoutes) < 1 {\n\t\treturn []Route{}, nil\n\t}\n\n\troutes := make([]Route, len(rawRoutes))\n\tfor i, r := range rawRoutes {\n\t\tm, ok := r.(map[string]any)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"entry %v in tun.unsafe_routes is invalid\", i+1)\n\t\t}\n\n\t\tvar mtu int\n\t\tif rMtu, ok := m[\"mtu\"]; ok {\n\t\t\tmtu, ok = rMtu.(int)\n\t\t\tif !ok {\n\t\t\t\tmtu, err = strconv.Atoi(rMtu.(string))","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/overlay/route.go#L141-L177","documentation":"Config validation error in parseUnsafeRoutes: the value at tun.unsafe_routes did not type-assert to []any — it is present but not a YAML list (e.g. a scalar or map). The whole setting is rejected before any entry is parsed.","triggerScenarios":"Thrown at overlay/route.go:159 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write tun.unsafe_routes as a YAML list of mappings","Check indentation so the setting is not parsed as a string/map"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dd8f660c0ac37903ec4080ca4d3c861ba9342ceb","analyzedAt":"2026-09-03T11:13:55.444Z","contentChangedAt":"2026-09-03T11:13:55.444Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}