{"record":{"id":"574149cbf10731cc","repo":"wtfutil/wtf","slug":"invalid-status-page-url-format-expected-stat","errorCode":null,"errorMessage":"invalid status page URL format. Expected '.../status/<slug>'","messagePattern":"invalid status page URL format\\. Expected '\\.\\.\\./status/<slug>'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/uptimekuma/widget.go","lineNumber":227,"sourceCode":"\t\treturn nil, err\n\t}\n\n\treturn &data, nil\n}\n\nfunc parseURL(rawURL string) (string, string, error) {\n\tif rawURL == \"\" {\n\t\treturn \"\", \"\", fmt.Errorf(\"URL is not defined\")\n\t}\n\n\tu, err := url.Parse(rawURL)\n\tif err != nil {\n\t\treturn \"\", \"\", fmt.Errorf(\"invalid URL: %w\", err)\n\t}\n\n\tparts := strings.Split(strings.Trim(u.Path, \"/\"), \"/\")\n\tif len(parts) < 2 || parts[0] != \"status\" {\n\t\treturn \"\", \"\", fmt.Errorf(\"invalid status page URL format. Expected '.../status/<slug>'\")\n\t}\n\n\tslug := parts[1]\n\tbaseURL := fmt.Sprintf(\"%s://%s\", u.Scheme, u.Host)\n\n\treturn baseURL, slug, nil\n}\n","sourceCodeStart":209,"sourceCodeEnd":235,"githubUrl":"https://github.com/wtfutil/wtf/blob/bb838c1ccb0f0f3223690df44afdec663d622881/modules/uptimekuma/widget.go#L209-L235","documentation":"The Uptime Kuma widget expects a status-page URL of the form '<base>/status/<slug>'. parseURL splits the URL path on '/' after trimming slashes; if there are fewer than two path segments or the first segment is not literally 'status', it throws this error. The slug and base URL are required to build the API endpoints.","triggerScenarios":"Refresh calls parseURL with a valid URL whose path is not '.../status/<slug>' — e.g. url: \"https://uptime.example.com\" (no path), url: \"https://uptime.example.com/dashboard/main\", or url: \"https://uptime.example.com/status/\" (empty slug).","commonSituations":"Users paste the Uptime Kuma dashboard URL or bare instance URL instead of the public status page URL; leaving off the slug; using a reverse-proxy path prefix that changes the path layout.","solutions":["Use the public status page URL exactly as shown in Uptime Kuma, including /status/<slug>: https://your-uptime/status/main","Find the slug in Uptime Kuma under Status Pages settings (the editable URL segment) and append it to the URL","If serving under a subpath, ensure the /status/<slug> portion is still present in the configured URL"],"exampleFix":"// before\nurl: \"https://uptime.example.com\"\n// after\nurl: \"https://uptime.example.com/status/main\"","handlingStrategy":"validation","validationCode":"u, _ := url.Parse(cfg.URL)\nsegs := strings.Split(strings.Trim(u.Path, \"/\"), \"/\")\nif len(segs) < 2 || segs[0] != \"status\" || segs[1] == \"\" {\n    return fmt.Errorf(\"uptimekuma url must end in /status/<slug>, got path %q\", u.Path)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy the status page URL from the browser address bar on the public status page","Don't use the dashboard or bare instance URL","Verify the slug exists in Uptime Kuma's Status Pages settings"],"tags":["go","config","uptime-kuma","url-validation"],"backgroundTag":"invalid-url-format","analyzedSha":"bb838c1ccb0f0f3223690df44afdec663d622881","analyzedAt":"2026-09-03T17:02:45.030Z","contentChangedAt":"2026-09-03T17:02:45.030Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}